Socket
Socket
Sign inDemoInstall

axios-retry

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-retry - npm Package Compare versions

Comparing version 3.8.0 to 3.8.1

11

lib/cjs/index.js

@@ -306,3 +306,3 @@ "use strict";

if (!_context.sent) {
_context.next = 20;
_context.next = 21;
break;

@@ -339,3 +339,6 @@ }

}];
onRetry(currentState.retryCount, error, config);
_context.next = 20;
return onRetry(currentState.retryCount, error, config);
case 20:
return _context.abrupt("return", new Promise(function (resolve) {

@@ -347,6 +350,6 @@ return setTimeout(function () {

case 20:
case 21:
return _context.abrupt("return", Promise.reject(error));
case 21:
case 22:
case "end":

@@ -353,0 +356,0 @@ return _context.stop();

@@ -271,3 +271,3 @@ 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); } }

config.transformRequest = [data => data];
onRetry(currentState.retryCount, error, config);
yield onRetry(currentState.retryCount, error, config);
return new Promise(resolve => setTimeout(() => resolve(axios(config)), delay));

@@ -274,0 +274,0 @@ }

{
"name": "axios-retry",
"version": "3.8.0",
"version": "3.8.1",
"author": "Rubén Norte <ruben.norte@softonic.com>",

@@ -5,0 +5,0 @@ "description": "Axios plugin that intercepts failed requests and retries them whenever posible.",

@@ -68,3 +68,3 @@ # axios-retry

| retryDelay | `Function` | `function noDelay() { return 0; }` | A callback to further control the delay in milliseconds between retried requests. By default there is no delay between retries. Another option is exponentialDelay ([Exponential Backoff](https://developers.google.com/analytics/devguides/reporting/core/v3/errors#backoff)). The function is passed `retryCount` and `error`. |
| onRetry | `Function` | `function onRetry(retryCount, error, requestConfig) { return; }` | A callback to notify when a retry is about to occur. Useful for tracing. By default nothing will occur. The function is passed `retryCount`, `error`, and `requestConfig`. |
| onRetry | `Function` | `function onRetry(retryCount, error, requestConfig) { return; }` | A callback to notify when a retry is about to occur. Useful for tracing and you can any async process for example refresh a token on 401. By default nothing will occur. The function is passed `retryCount`, `error`, and `requestConfig`. |

@@ -71,0 +71,0 @@ ## Testing

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc