Skip to main content

@midnight-ntwrk/dapp-connector-api v1.1.0Readme | API


@midnight-ntwrk/dapp-connector-api v1.1.0 / APIError

Class: APIError

Whenever there's a function called that returns a promise, an error with the shape can be thrown.

Extends

  • CustomError

Constructors

new APIError(code, reason)

new APIError(code, reason): APIError

Parameters

code: ErrorCode

reason: string

Returns

APIError

Overrides

CustomError.constructor

Properties

code

code: ErrorCode

The code of the error that's thrown


reason

reason: string

The reason the error is thrown