supra-ts-sdk - v2.0.0
    Preparing search index...

    Function createSupraAPIError

    • Builds the error for an error response: the subclass of SupraAPIError for the status, with retryAfterSeconds filled in for HTTP 429.

      Parameters

      • args: SupraAPIErrorOptions

        The status, status text, URL and parsed body of the response.

      • OptionalretryAfterHeader: string | null

        The value of the response's Retry-After header, if any.

      • OptionaloldestBlockHeader: string | null

        The value of the response's x-supra-oldest-block header, if any.

      Returns SupraAPIError