Fetch Client API Documentation - v1.1.1
    Preparing search index...

    Variable RETRY_DEFAULTSConst Readonly

    RETRY_DEFAULTS: {
        MAX_RETRIES: 3;
        DELAY: 1000;
        MAX_DELAY: 30000;
        JITTER_FACTOR: 0.1;
    } = ...

    Default retry configuration values

    Type Declaration

    • ReadonlyMAX_RETRIES: 3

      Default number of retry attempts before giving up

    • ReadonlyDELAY: 1000

      Default base delay between retries in milliseconds

    • ReadonlyMAX_DELAY: 30000

      Maximum delay between retries to prevent excessive waits

    • ReadonlyJITTER_FACTOR: 0.1

      Jitter factor to prevent thundering herd (10% randomization)

    Controls the exponential backoff retry mechanism with jitter to prevent thundering herd problems when multiple clients retry simultaneously.

    // Calculate retry delay with exponential backoff
    const delay = RETRY_DEFAULTS.DELAY * Math.pow(2, attempt);
    const jitter = delay * RETRY_DEFAULTS.JITTER_FACTOR * Math.random();
    const totalDelay = Math.min(delay + jitter, RETRY_DEFAULTS.MAX_DELAY);