Skip to main content

Class: NablaConnectError

The error of every rejected SDK promise and of the error event. Branch on code.

Extends​

  • Error

Constructors​

Constructor​

new NablaConnectError(code, reason?, options?): NablaConnectError

Builds an error, for example to fake a rejection in your tests.

Parameters​

code​

NablaConnectErrorCode

The stable code.

reason?​

string

With COMMAND_REJECTED, why the iframe refused. With a command TIMEOUT, NO_RESULT.

options?​

ErrorOptions

The cause, when the error wraps another one.

Returns​

NablaConnectError

Overrides​

Error.constructor

Properties​

cause?​

optional cause?: unknown

Inherited from​

Error.cause


code​

readonly code: NablaConnectErrorCode

A stable code.


message​

message: string

Inherited from​

Error.message


name​

name: string

Inherited from​

Error.name


reason?​

readonly optional reason?: string

With COMMAND_REJECTED, why the iframe refused or failed the command: NOT_ALLOWED, STALE_STATE, INVALID_SESSION, EXPORT_FAILED or UNKNOWN. With the TIMEOUT of a command, NO_RESULT: the iframe may still run it.


stack?​

optional stack?: string

Inherited from​

Error.stack