@consumidor-positivo/ts-utils - v1.13.0
    Preparing search index...

    Type Alias WithRetryOpts

    Options for configuring retry behavior.

    type WithRetryOpts = {
        maxRetries?: number;
        onRetry?: (error: unknown, retryCount: number) => void;
    }
    Index

    Properties

    maxRetries?: number

    The maximum number of retries to attempt after the initial operation fails. Default is 1 retry.

    onRetry?: (error: unknown, retryCount: number) => void

    Callback function that will be invoked on each retry attempt. Receives the error that caused the retry and the number of retries remaining.

    Type declaration

      • (error: unknown, retryCount: number): void
      • Parameters

        • error: unknown

          The error that caused the operation to fail

        • retryCount: number

          The number of retries remaining

        Returns void