Skip to content

TransferRetryPolicy

Defined in: src/transfers/TransferEngine.ts:65

Retry policy for transfer execution.

Use createDefaultRetryPolicy for a production-ready policy with exponential backoff, full jitter, and Retry-After support, or implement the hooks directly for full control.

PropertyTypeDescriptionDefined in
maxAttempts?numberMaximum total attempts, including the first attempt. Defaults to 1.src/transfers/TransferEngine.ts:67
optional getDelayMs(input: TransferRetryDecisionInput): number;

Defined in: src/transfers/TransferEngine.ts:77

Computes the delay before the next attempt in milliseconds.

The engine sleeps for the returned duration with an abort-aware timer: cancelling the job during the delay rejects immediately instead of waiting out the backoff. Non-positive or missing values retry at once.

ParameterType
inputTransferRetryDecisionInput

number


optional onRetry(input: TransferRetryDecisionInput): void;

Defined in: src/transfers/TransferEngine.ts:79

Observes retry decisions before the next attempt starts.

ParameterType
inputTransferRetryDecisionInput

void


optional shouldRetry(input: TransferRetryDecisionInput): boolean;

Defined in: src/transfers/TransferEngine.ts:69

Decides whether a failed attempt should be retried. Defaults to SDK retryability metadata.

ParameterType
inputTransferRetryDecisionInput

boolean