brettlangdon/node-dogapi — pull request #4 by reason-bv (2014-05-19 16:48:12+00:00)
Title: Add an error listener to prevent socket hang up and similar errors leading to thrown exceptions.

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.