Options for customizing retries. Retriable server errors will be retried with exponential delay between them dictated by the formula max(maxRetryDelay, retryDelayMultiplier*retryNumber) until maxRetries or totalTimeout has been reached. Retries will only happen if autoRetry is set to true.
Package
@google-cloud/storageProperties
autoRetry
autoRetry?: boolean;
Automatically retry requests if the response is related to rate limits or certain intermittent server errors. We will exponentially backoff subsequent requests by default.
idempotencyStrategy
idempotencyStrategy?: IdempotencyStrategy;
Enumeration controls how conditionally idempotent operations are retried. Possible values are: RetryAlways - will respect other retry settings and attempt to retry conditionally idempotent operations. RetryConditional - will retry conditionally idempotent operations if the correct preconditions are set. RetryNever - never retry a conditionally idempotent operation.
maxRetries
maxRetries?: number;
Maximum number of automatic retries attempted before returning the error.
maxRetryDelay
maxRetryDelay?: number;
The maximum delay time between requests. When this value is reached, ``retryDelayMultiplier`` will no longer be used to increase delay time.
retryableErrorFn
retryableErrorFn?: (err: ApiError) => boolean;
Function that returns true if a given error should be retried and false otherwise.
retryDelayMultiplier
retryDelayMultiplier?: number;
The multiplier by which to increase the delay time between the completion of failed requests, and the initiation of the subsequent retrying request.
totalTimeout
totalTimeout?: number;
The total time, starting from when the initial request is sent, after which an error will be returned, regardless of the retrying attempts made meanwhile.