glassnode-api - v0.29.3
    Preparing search index...

    Interface GlassnodeErrorEvent

    onError: the call failed — fired once per call, with the error it rejects with.

    interface GlassnodeErrorEvent {
        attempt: number;
        callId: number;
        durationMs?: number;
        elapsedMs: number;
        endpoint: string;
        error: GlassnodeError;
        maxAttempts: number;
        method: "GET";
        status?: number;
        url: string;
    }

    Hierarchy (View Summary)

    Index
    attempt: number

    1-based number of the attempt the event is about. For onError, the last attempt made, or 0 when the call was cancelled before its first attempt.

    callId: number

    Correlation id of the call: every event of one method call (all its attempts and retries) carries the same id, and no other call in this JavaScript realm has it. A process-local counter — add your own prefix if ids must be unique across processes.

    durationMs?: number

    Duration of the last attempt in ms; absent when no attempt was sent.

    elapsedMs: number

    Milliseconds from the start of the call (first attempt, waits included) until it failed.

    endpoint: string

    API endpoint path, without host or query string (e.g. /v1/metrics/market/price_usd_close).

    The error the call rejects with — the same live object the caller receives, so do not mutate it (a change would be visible to the caller).

    maxAttempts: number

    Most attempts this call can make: maxRetries + 1.

    method: "GET"

    HTTP method. The Glassnode API is read-only, so this is always 'GET'.

    status?: number

    HTTP status behind the error, when there is one (GlassnodeApiError, GlassnodePaymentError).

    url: string

    Full request URL with the API key masked (api_key=***).