Skip to main content

InvalidResponseError <ErrorType, RequestType>

Base class for Web3 errors.

Hierarchy

Index

Constructors

publicconstructor

Properties

publiccause

cause: undefined | Error

publiccode

code: number = ERR_RESPONSE

publicoptionaldata

data?: ErrorType | ErrorType[]

publicreadonlyname

name: string

publicoptionalrequest

request?: JsonRpcPayload<RequestType>

publicstack

stack: undefined | string

publicoptionalstatusCode

statusCode?: number

Accessors

publicinnerError

  • get innerError(): undefined | Error | Error[]
  • set innerError(cause: undefined | Error | Error[]): void
  • @deprecated

    Use the cause property instead.


    Returns undefined | Error | Error[]

  • @deprecated

    Use the cause property instead.


    Parameters

    • cause: undefined | Error | Error[]

    Returns void

Methods

publictoJSON

  • toJSON(): { cause: undefined | Error; code: number; data: undefined | ErrorType | ErrorType[]; innerError: undefined | Error; message: string; name: string; request: undefined | JsonRpcPayload<RequestType>; statusCode: undefined | number }
  • Returns { cause: undefined | Error; code: number; data: undefined | ErrorType | ErrorType[]; innerError: undefined | Error; message: string; name: string; request: undefined | JsonRpcPayload<RequestType>; statusCode: undefined | number }

    • cause: undefined | Error
    • code: number
    • data: undefined | ErrorType | ErrorType[]
    • innerError: undefined | Error
    • message: string
    • name: string
    • request: undefined | JsonRpcPayload<RequestType>
    • statusCode: undefined | number

publicstaticconvertToString

  • convertToString(value: unknown, unquotValue?: boolean): string
  • Parameters

    • value: unknown
    • unquotValue: boolean = false

    Returns string