brettlangdon / node-dogapi

Datadog API Node.JS Client
https://brettlangdon.github.io/node-dogapi/
105 stars 45 forks source link

Add an error listener to prevent socket hang up and similar errors leading to thrown exceptions. #4

Closed reason-bv closed 9 years ago

reason-bv commented 10 years ago

Socket hang ups and SSL issues can cause a thrown exception, e.g. if a DataDog API server glitches at just the right time. We have seen this happen intermittently.

The way to prevent this from throwing is to add an error event handler to the request, so that the error is passed to the callback as expected.

brettlangdon commented 9 years ago

wow, not sure why I never saw this pull request, @reason-bv, should have bugged me more about it!

I am going to merge in another pull request soon, so I can land this one in there as well.