Type Alias RetrySettings<TParameters>

RetrySettings: RetryCallbacks<TParameters> & ErrorPolicySettings & {
    backoffPolicy?: BackoffPolicy;
    maxAttempts?: number;
    throwLastError?: boolean;
}

Configuration for the retry resilience middleware. Retries the wrapped function up to a maximum number of attempts. Supports configurable backoff policies and lifecycle callbacks.

IMPORT_PATH: "@daiso-tech/core/resilience"

Type Parameters

  • TParameters extends unknown[] = unknown[]

Type declaration

  • OptionalbackoffPolicy?: BackoffPolicy
    import { exponentialBackoff } from "@daiso-tech/core/backoff-policies";

    exponentialBackoff();
  • OptionalmaxAttempts?: number

    You can decide maximal times you can retry.

    4
    
  • OptionalthrowLastError?: boolean

    If true last error will be thrown otherwise an RetryResilienceError will be thrown.

    false