@bbc/http-transport
Advanced tools
Comparing version 4.5.0 to 4.5.1
@@ -356,2 +356,5 @@ 'use strict'; | ||
/** | ||
* Retries only work on critical HTTP 5XX errors | ||
*/ | ||
function retry(fn, ctx) { | ||
@@ -364,3 +367,3 @@ ctx.retryAttempts = []; | ||
.catch((err) => { | ||
if (maxAttempts > 0) { | ||
if (i < maxAttempts && isCriticalError(err) && ctx.retryDelay && ctx.retryDelay > 0) { | ||
const delayBy = rejectedPromise(ctx.retryDelay); | ||
@@ -367,0 +370,0 @@ return delayBy(err); |
@@ -13,2 +13,5 @@ 'use strict'; | ||
constructor(defaults) { | ||
/** | ||
* Retries only work on critical HTTP 5XX errors | ||
*/ | ||
this.retries = 0; | ||
@@ -15,0 +18,0 @@ this.redirect = undefined; |
{ | ||
"name": "@bbc/http-transport", | ||
"version": "4.5.0", | ||
"version": "4.5.1", | ||
"description": "A flexible, modular REST client built for ease-of-use and resilience.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
394453
6920
3