Skip to content

ConnectError

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

A connection attempt failed (connect/*). Carries the original connect target so UIs can retry or explain in one pass, and — for modality conflicts — the device already occupying the slot.

new ConnectError(code, target, message, options?): ConnectError

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

Creates a connect/* error for the given connect target.

"connect/timeout" | "connect/not-found" | "connect/incompatible-device" | "connect/device-limit" | "connect/modality-conflict" | "connect/cancelled"

object | DeviceId

string

ConnectErrorOptions

ConnectError

ConsoleSdkError.constructor

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.

ConsoleSdkError.cause


readonly code: "connect/timeout" | "connect/not-found" | "connect/incompatible-device" | "connect/device-limit" | "connect/modality-conflict" | "connect/cancelled"

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

The connect/* code identifying the connection failure.

ConsoleSdkError.code


readonly optional conflictingDeviceId?: DeviceId

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

Present iff code === 'connect/modality-conflict' — the connected device of the same modality, so a “swap machines?” prompt renders in one pass.


readonly optional deviceId?: DeviceId

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

Present whenever the failure is attributable to a specific device.

ConsoleSdkError.deviceId


message: string

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

ConsoleSdkError.message


name: string

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

ConsoleSdkError.name


optional stack?: string

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

ConsoleSdkError.stack


readonly target: object | DeviceId

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

The target the failed connect() was asked to reach. Structurally this is the public ConnectTarget union (DeviceId | Device | { consoleId } | { nearest }); it is declared wide here because errors/ is a foundations-layer leaf module and the canonical ConnectTarget lands with the fleet surface.