etherscan-api
    Preparing search index...

    Class EtherscanHttpError

    Error thrown by the default transport when Etherscan answers with a non-2xx HTTP status. Carries the status code and response headers so callers can tell a 429 from a 5xx and honour Retry-After. It extends EtherscanError: the same condition (a rate limit, say) can arrive as a 200 with status "0" or as a 429, and one instanceof check catches both.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    cause?: unknown
    headers: Record<string, string | string[] | undefined>

    The response headers (lower-cased names), e.g. headers['retry-after']. Typed structurally rather than as node:http's IncomingHttpHeaders so the declarations do not require consumers to install @types/node.

    message: string
    name: string
    responseMessage?: unknown

    The response's own message field (e.g. "NOTOK"), if any. Kept apart from message, which usually carries the more specific result text.

    result?: unknown

    The raw result (or error) field from the response, if any.

    stack?: string
    status?: unknown

    The raw status field from the response, if any.

    statusCode: number

    The HTTP status code, e.g. 429.

    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void