TomTom Maps for JavaScript
    Preparing search index...

    Type Alias RetryConfig

    Configuration for automatic retry behavior on rate-limited (429) responses.

    When a service request receives a 429 status code, the SDK will automatically retry the request using exponential backoff. The Retry-After header from the API response is respected when present.

    TomTomConfig.instance.put({
    retry: {
    initialWaitMs: 0.447,
    backoffFactor: 1.618,
    timeoutMs: 60000,
    }
    });
    type RetryConfig = {
        backoffFactor?: number;
        initialWaitMs?: number;
        timeoutMs?: number;
    }
    Index

    Properties

    backoffFactor?: number

    Multiplier applied to the wait time after each subsequent retry.

    For example, with initialWaitMs: 0.447 and backoffFactor: 1.618, wait times would be: 0.447ms, 0.723ms, 1.170ms, etc.

    1.618
    
    initialWaitMs?: number

    Initial wait time in milliseconds before the first retry.

    Used as the base delay when no Retry-After header is present.

    0.447
    
    timeoutMs?: number

    Maximum total time in milliseconds to spend retrying before giving up.

    If the next retry wait would exceed this timeout (measured from the first request), the SDK returns the 429 error to the caller.

    60000