New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@sebspark/retry

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sebspark/retry

A helper for retrying any promise call (ex an http request) with error rules and backoff

Source
npmnpm
Version
1.0.14
Version published
Weekly downloads
654
106.31%
Maintainers
3
Weekly downloads
 
Created
Source

@sebspark/retry

A helper for retrying any promise call (ex an http request) with error rules and backoff

Usage

import { retry, interval, retryCondition, RetrySettings } from '@sebspark/retry'
import axios from 'axios'

const settings: RetrySettings = {
  interval: interval.exponential(1000), // Exponential backoff starting at 1000 ms
  maxRetries: 5,
  retryCondition: retryCondition.serverErrors, // Only retries on server errors
}

const result = await retry(() => axios.get('https://example.com'), settings)

FAQs

Package last updated on 18 May 2026

Related posts