Type Alias ErrorRetryOptions
ErrorRetryOptions: { enableRetry?: boolean | ((config: XiorRequestConfig,
error: XiorError) => boolean | undefined); onRetry?: ((config: XiorRequestConfig,
error: XiorError,
count: number) => void); retryInterval?: number | ((count: number,
config: XiorInterceptorRequestConfig,
error: XiorError) => number); retryTimes?: number; } Type declaration
Optional
enableRetry?: boolean | ((config: XiorRequestConfig, error: XiorError) => boolean | undefined)
Optional
onRetry?: ((config: XiorRequestConfig, error: XiorError, count: number) => void)
- (config, error, count): void
Returns void
Optional
retryInterval?: number | ((count: number, config: XiorInterceptorRequestConfig, error: XiorError) => number)
Optional
retryTimes?: number
default: true, it's useful because we don't want retry when the error because of token expired