Skip to content

retryRequest

function retryRequest<T>(send, options?): Promise<T>;

Calls send up to attempts (default: 3) times, retrying upon encountering a transient status code (500, 502, 503, 504, 408) or a network connection drop (ECONNRESET, ETIMEDOUT, etc.).

T

() => Promise<T>

The asynchronous function to execute

RetryRequestOptions = {}

Retry options

Promise<T>

The resolved result of send()