diff --git a/lib/adapters/http.js b/lib/adapters/http.js index 40c6198..8a6fbf6 100644 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -76,6 +76,11 @@ module.exports = function httpAdapter(resolve, reject, config) { }); }); + // Handle errors + req.on('error', function (err) { + reject(err); + }); + // Send the request req.end(data); }; \ No newline at end of file