Skip to main content

APIError

@midnight-ntwrk/dapp-connector-api v3.0.0


@midnight-ntwrk/dapp-connector-api / 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()​

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