axios-retry
Advanced tools
Comparing version 3.7.0 to 3.8.0
@@ -40,5 +40,7 @@ "use strict"; | ||
function isNetworkError(error) { | ||
var CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED']; | ||
return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests | ||
error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests | ||
(0, _isRetryAllowed.default)(error); // Prevents retrying unsafe errors | ||
!CODE_EXCLUDE_LIST.includes(error.code) && // Prevents retrying timed out & cancelled requests | ||
(0, _isRetryAllowed.default)(error) // Prevents retrying unsafe errors | ||
; | ||
} | ||
@@ -45,0 +47,0 @@ |
@@ -19,5 +19,7 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
export function isNetworkError(error) { | ||
var CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED']; | ||
return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests | ||
error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests | ||
isRetryAllowed(error); // Prevents retrying unsafe errors | ||
!CODE_EXCLUDE_LIST.includes(error.code) && // Prevents retrying timed out & cancelled requests | ||
isRetryAllowed(error) // Prevents retrying unsafe errors | ||
; | ||
} | ||
@@ -24,0 +26,0 @@ var SAFE_HTTP_METHODS = ['get', 'head', 'options']; |
{ | ||
"name": "axios-retry", | ||
"version": "3.7.0", | ||
"version": "3.8.0", | ||
"author": "Rubén Norte <ruben.norte@softonic.com>", | ||
@@ -5,0 +5,0 @@ "description": "Axios plugin that intercepts failed requests and retries them whenever posible.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70809
882