Socket
Socket
Sign inDemoInstall

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`


Version published
Weekly downloads
6.5M
decreased by-5.19%
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

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

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