@tikoci/centrs
    Preparing search index...

    Function runWithRetry

    • Run run, retrying only isRetryableFanoutError failures up to maxRetries times with jittered backoff. A non-retryable error, or the final exhausted attempt, is converted to a value via recover (so a fan-out target yields an inner error envelope instead of throwing out of the batch).

      Type Parameters

      • T

      Parameters

      • run: () => Promise<T>
      • recover: (error: unknown) => T
      • options: { maxRetries?: number; sleep?: (ms: number) => Promise<void> } = {}

      Returns Promise<T>