Zum Inhalt springen
Deutsch

retry

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

retry<T>(factory, options): Promise<T>

Defined in: src/pattern/Retry.ts:101

Invoke factory up to options.attempts times with configurable exponential backoff. Returns the first successful result. Propagates the final error if every attempt fails or shouldRetry vetoes a retry.

Every delay is bounded twice: by maxDelayMs, which now defaults to DEFAULT_MAX_RETRY_DELAY_MS rather than to infinity, and unconditionally by MAX_TIMER_DELAY_MS (#771).

T

() => Promise<T>

RetryOptions

Promise<T>