mirror of
https://github.com/tenrok/axios.git
synced 2026-06-05 16:42:32 +03:00
Fixing #171, don't fail on error responses with json payloads
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
config: config
|
||||
};
|
||||
// Resolve or reject the Promise based on the status
|
||||
((request.status >= 200 && request.status < 300) || (request.responseText && xDomain) ?
|
||||
((request.status >= 200 && request.status < 300) || (xDomain && request.responseText) ?
|
||||
resolve :
|
||||
reject)(response);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user