Skip to content

retry

retry<T>(fn, options?): Promise<T>

Defined in: src/functions.ts:18

One-off retry, no pipeline needed: await retry(() => fetchUser(id), { maxRetryAttempts: 5, backoffType: 'exponential' }). Throw NonRetryableError from fn to stop early.

T

(context) => MaybePromise<T>

RetryOptions<T> & CallOptions = {}

Promise<T>