2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-23 20:40:40 +03:00

Merge pull request #174 from aukevanleeuwen/fix-for-issue-171

Fixing #171, don't fail on error responses with json payloads
This commit is contained in:
Matt Zabriskie
2015-12-14 14:55:30 -07:00
+1 -1
View File
@@ -72,7 +72,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
config: config config: config
}; };
// Resolve or reject the Promise based on the status // 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 : resolve :
reject)(response); reject)(response);