mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Compatible with follow-redirect aborts the request (#2689)
* Compatible with follow-redirect aborts the request * Use the error code
This commit is contained in:
@@ -240,7 +240,7 @@ module.exports = function httpAdapter(config) {
|
|||||||
|
|
||||||
// Handle errors
|
// Handle errors
|
||||||
req.on('error', function handleRequestError(err) {
|
req.on('error', function handleRequestError(err) {
|
||||||
if (req.aborted) return;
|
if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
|
||||||
reject(enhanceError(err, config, null, req));
|
reject(enhanceError(err, config, null, req));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -75,7 +75,7 @@
|
|||||||
"unpkg": "dist/axios.min.js",
|
"unpkg": "dist/axios.min.js",
|
||||||
"typings": "./index.d.ts",
|
"typings": "./index.d.ts",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "1.5.10"
|
"follow-redirects": "^1.10.0"
|
||||||
},
|
},
|
||||||
"bundlesize": [
|
"bundlesize": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user