New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign 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`

latest
Source
npmnpm
Version
3.0.0
Version published
Weekly downloads
13M
2.43%
Maintainers
2
Weekly downloads
 
Created
Source

is-retry-allowed

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

Install

$ npm install is-retry-allowed

Usage

import isRetryAllowed from 'is-retry-allowed';

isRetryAllowed({code: 'ETIMEDOUT'});
//=> true

isRetryAllowed({code: 'ENOTFOUND'});
//=> false

isRetryAllowed({});
//=> true

API

isRetryAllowed(error)

error

Type: Error | object

The .code property, if it exists, will be used to determine whether retry is allowed.

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

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