RetryConfig
Configuration for the Axios request
method.
Properties
backoffType
"linear" | "static" | "exponential"Backoff Type; 'linear', 'static' or 'exponential'.
checkRetryAfter
booleanWhether to check for 'Retry-After' header in response and use value as delay. Defaults to true.
currentRetryAttempt
numberThe number of retries already attempted.
httpMethodsToRetry
string[]The HTTP Methods that will be automatically retried. Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']
instance
AxiosInstanceThe instance of the axios object to which the interceptor is attached.
maxRetryAfter
numberMax permitted Retry-After value (in ms) - rejects if greater. Defaults to 5 mins.
maxRetryDelay
numberCeiling for calculated delay (in ms) - delay will not exceed this value.
noResponseRetries
numberWhen there is no response, the number of retries to attempt. Defaults to 2.
onRetryAttempt
(err: AxiosError<any, any>) => voidFunction to invoke when a retry attempt is made.
retry
numberThe number of times to retry the request. Defaults to 3.
retryDelay
numberThe amount of time to initially delay the retry. Defaults to 100.
shouldRetry
(err: AxiosError<any, any>) => booleanFunction to invoke which determines if you should retry
statusCodesToRetry
number[][]The HTTP response status codes that will automatically be retried. Defaults to: [[100, 199], [429, 429], [500, 599]]
Was this section helpful?