2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00

Adding error handling to request for node.js - closes #18

This commit is contained in:
mzabriskie
2014-10-15 10:29:40 -06:00
parent 1d6430f667
commit 5fce14d9ec
+5
View File
@@ -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);
};