-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crash in sendgrid module due to parsing bad response #94
Comments
By the way, this needs to be fixed in the sendgrid module, as we have none of our own app code on the stack to catch this exception when it happens. |
Thanks for catching this Seth. I just landed and will look and fix it as soon as possible. If you get to creating the pull request first then I'll review. Otherwise I'll code it up. — On Mon, Sep 30, 2013 at 2:01 PM, Seth Pollack notifications@github.com
|
Thanks. if you can make the fix that would be great. I figured you'd want to look at it, for a couple of reasons:
|
@spollack this is fixed now in Latest should be up on npm within the next 15 minutes. https://npmjs.org/package/sendgrid Fix here: https://github.com/sendgrid/sendgrid-nodejs/blob/master/lib/sendgrid.js Internally, it looks like it was related to a temporary timeout issue we had. |
Thanks @scottmotte ! |
We had a production crash last night in the sendgrid module. At line 83 in sendgrid.js, there is a call
JSON.parse(body);
. This threw an exception because apparently the sendgrid service must have sent an unexpected response. calls to JSON.parse should always be wrapped in a try/catch to handle this sort of case.Here was the stack at the crash:
The text was updated successfully, but these errors were encountered: