Skip to content

ConsoleSdkError

Defined in: console-sdk/src/errors/classes.ts:27

Base class of every error the Console SDK produces — one hierarchy, discriminated by the namespaced ConsoleSdkErrorCode string on code. Both instanceof checks and code matching narrow; substring classification of message is never required.

  • Error

readonly optional cause?: unknown

Defined in: console-sdk/src/errors/classes.ts:41

The underlying lower-level error, when one exists. Typed unknown — never a ble-plx (or any other dependency) type publicly.

Error.cause


abstract readonly code: ConsoleSdkErrorCode

Defined in: console-sdk/src/errors/classes.ts:32

Namespaced, greppable discriminant. Subclasses narrow this to their namespace (e.g. ConnectError.code is `connect/${string}`).


readonly optional deviceId?: DeviceId

Defined in: console-sdk/src/errors/classes.ts:35

Present whenever the failure is attributable to a specific device.


message: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077

Error.message


name: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076

Error.name


optional stack?: string

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078

Error.stack