github/hubot-scripts — pull request #1182 by EnotionZ (2013-10-10 18:19:52+00:00)
Title: Handle error for stock info request

We should handle the error for this callback, specifically in the case where the ticker doesn't match any existing company. Oddly enough when the ticker doesn't exist, the `err` object is still `null` but `body` is an empty string. This commit ensures `JSON.parse` isn't called on an empty string, preventing hubot from dying.