2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-24 14:04:14 +03:00

Implementing adapter error enhacement

This commit is contained in:
Rubén Norte
2016-07-07 16:01:20 +02:00
parent 75f9b8c5fd
commit 235c19c876
+2 -2
View File
@@ -2,6 +2,7 @@
var utils = require('./../utils');
var transformData = require('./transformData');
var enhanceError = require('./enhanceError');
/**
* Dispatch a request to the server using whichever adapter
@@ -54,7 +55,7 @@ module.exports = function dispatchRequest(config) {
adapter(resolve, reject, config);
}
} catch (e) {
reject(e);
reject(enhanceError(e, config));
}
}).then(function onFulfilled(response) {
// Transform response data
@@ -67,4 +68,3 @@ module.exports = function dispatchRequest(config) {
return response;
});
};