Skip to content

ConsoleSdkErrorCode

ConsoleSdkErrorCode = "ble/unsupported" | "ble/unauthorized" | "ble/powered-off" | "ble/scan-failed" | "connect/timeout" | "connect/not-found" | "connect/incompatible-device" | "connect/device-limit" | "connect/modality-conflict" | "connect/cancelled" | "command/not-connected" | "command/unsupported" | "command/timeout" | "command/rejected" | "command/busy" | "session/invalid-plan" | "session/arm-failed" | "session/already-active" | "session/wrong-phase" | "session/console-stopped" | "session/devices-lost" | "session/bluetooth-off" | "record/unavailable" | "record/mismatch" | "firmware/manifest-unavailable" | "firmware/download-failed" | "firmware/verify-failed" | "firmware/transfer-failed" | "firmware/device-rejected" | "sdk/outside-provider" | "sdk/disposed" | "sdk/duplicate-ble-transport"

Defined in: console-sdk/src/errors/codes.ts:18

Every failure the Console SDK can produce, as one namespaced string-literal union. Codes are greppable, exhaustive, and namespaced by domain (ble/, connect/, command/, session/, record/, firmware/, sdk/); each ConsoleSdkError subclass narrows this union to its namespace via Extract, so both instanceof checks and code matching narrow correctly.

Two codes are documented non-failures:

  • 'connect/cancelled' — an aborted connectAsync() rejects with it only because a promise must settle; it is excluded from onError.
  • 'session/console-stopped' — the premature-FINISH (“user pressed HOME on the console”) heuristic surfaced as a first-class, matchable outcome rather than a silent guess.