Skip to main content

Interface: RetryConfig

internal.RetryConfig

Configuration for the Axios requestCopy to Clipboard method.

Properties

backoffType

OptionalCopy to Clipboard backoffType: "linear"Copy to Clipboard | "static"Copy to Clipboard | "exponential"Copy to Clipboard

Backoff Type; 'linear', 'static' or 'exponential'.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:47


checkRetryAfter

OptionalCopy to Clipboard checkRetryAfter: booleanCopy to Clipboard

Whether to check for 'Retry-After' header in response and use value as delay. Defaults to true.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:51


currentRetryAttempt

OptionalCopy to Clipboard currentRetryAttempt: numberCopy to Clipboard

The number of retries already attempted.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:13


httpMethodsToRetry

OptionalCopy to Clipboard httpMethodsToRetry: stringCopy to Clipboard[]

The HTTP Methods that will be automatically retried. Defaults to ['GET','PUT','HEAD','OPTIONS','DELETE']

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:26


instance

OptionalCopy to Clipboard instance: AxiosInstanceCopy to Clipboard

The instance of the axios object to which the interceptor is attached.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:21


maxRetryAfter

OptionalCopy to Clipboard maxRetryAfter: numberCopy to Clipboard

Max permitted Retry-After value (in ms) - rejects if greater. Defaults to 5 mins.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:55


maxRetryDelay

OptionalCopy to Clipboard maxRetryDelay: numberCopy to Clipboard

Ceiling for calculated delay (in ms) - delay will not exceed this value.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:59


noResponseRetries

OptionalCopy to Clipboard noResponseRetries: numberCopy to Clipboard

When there is no response, the number of retries to attempt. Defaults to 2.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:43


onRetryAttempt

OptionalCopy to Clipboard onRetryAttempt: (errCopy to Clipboard: AxiosErrorCopy to Clipboard<anyCopy to Clipboard, anyCopy to Clipboard>) => voidCopy to Clipboard

Type declaration

▸ (errCopy to Clipboard): voidCopy to Clipboard

Function to invoke when a retry attempt is made.

Parameters
NameType
errCopy to ClipboardAxiosErrorCopy to Clipboard<anyCopy to Clipboard, anyCopy to Clipboard>
Returns

voidCopy to Clipboard

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:35


retry

OptionalCopy to Clipboard retry: numberCopy to Clipboard

The number of times to retry the request. Defaults to 3.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:9


retryDelay

OptionalCopy to Clipboard retryDelay: numberCopy to Clipboard

The amount of time to initially delay the retry. Defaults to 100.

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:17


shouldRetry

OptionalCopy to Clipboard shouldRetry: (errCopy to Clipboard: AxiosErrorCopy to Clipboard<anyCopy to Clipboard, anyCopy to Clipboard>) => booleanCopy to Clipboard

Type declaration

▸ (errCopy to Clipboard): booleanCopy to Clipboard

Function to invoke which determines if you should retry

Parameters
NameType
errCopy to ClipboardAxiosErrorCopy to Clipboard<anyCopy to Clipboard, anyCopy to Clipboard>
Returns

booleanCopy to Clipboard

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:39


statusCodesToRetry

OptionalCopy to Clipboard statusCodesToRetry: numberCopy to Clipboard[][]

The HTTP response status codes that will automatically be retried. Defaults to: [[100, 199], [429, 429], [500, 599]]

Defined in

medusa-js/node_modules/retry-axios/dist/src/index.d.ts:31

Was this page helpful?