xior
    Preparing search index...

    Type Alias ErrorRetryOptions

    type 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;
    }
    Index

    Properties

    enableRetry?:
        | boolean
        | ((config: XiorRequestConfig, error: XiorError) => boolean | undefined)

    default: true, it's useful because we don't want retry when the error because of token expired

    onRetry?: (config: XiorRequestConfig, error: XiorError, count: number) => void
    retryInterval?:
        | number
        | (
            (
                count: number,
                config: XiorInterceptorRequestConfig,
                error: XiorError,
            ) => number
        )

    Retry after milliseconds, default: 3000 after first time error retry, retry interval

    retryTimes?: number

    retry times, default: 2