You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

is-retry-allowed

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-retry-allowed

Check whether a request can be retried based on the `error.code`

3.0.0
latest
Source
npmnpm
Version published
Weekly downloads
10M
8.39%
Maintainers
2
Weekly downloads
 
Created

What is is-retry-allowed?

The is-retry-allowed npm package is used to determine if a given error is transient and likely to be resolved by retrying the failed operation. It checks the error against a list of known transient errors and returns a boolean indicating whether a retry should be allowed.

What are is-retry-allowed's main functionalities?

Check if a retry is allowed for a given error

This feature allows you to pass an error object to the isRetryAllowed function, which returns true if the error is considered transient and retryable, or false otherwise.

const isRetryAllowed = require('is-retry-allowed');

const error = new Error('ECONNRESET');
const shouldRetry = isRetryAllowed(error);
console.log(shouldRetry); // Output: true

Other packages similar to is-retry-allowed

Keywords

retry

FAQs

Package last updated on 17 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts