mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Adding error handling to request for node.js - closes #18
This commit is contained in:
@@ -76,6 +76,11 @@ module.exports = function httpAdapter(resolve, reject, config) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Handle errors
|
||||||
|
req.on('error', function (err) {
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
|
|
||||||
// Send the request
|
// Send the request
|
||||||
req.end(data);
|
req.end(data);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user