Represents an error returned from the Aptos API. This class encapsulates the details of the error, including the request URL, response status, and additional data.

The name of the error, which is always "AptosApiError".

The URL to which the request was made.

The HTTP response status code (e.g., 400).

The message associated with the response status.

The response data returned from the API.

The original AptosRequest that triggered the error.

Hierarchy (view full)

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void

Properties

data: any
message: string
name: string
request: AptosRequest
stack?: string
status: number
statusText: string
url: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number