Options
All
  • Public
  • Public/Protected
  • All
Menu

Options to retry bad requests

Type parameters

  • D = unknown

    response data type

Hierarchy

  • RetryOptions

Index

Properties

Methods

Properties

attempts?: number

Maximum number of attempts to request

Methods

  • delay(attempt: number, error: default<D>): number | false | Promise<void>
  • Returns a number in milliseconds (or a promise) to wait before the next attempt. If the function returns false, it will prevent all further attempts.

    Parameters

    • attempt: number

      current attempt number

    • error: default<D>

      error object

    Returns number | false | Promise<void>