SpekoClientError, tagged with a stable string code.
Shape
Codes
| Code | Where it’s thrown |
|---|---|
CONNECTION_FAILED | VoiceConversation.create() — room.connect() rejected. cause is the original LiveKit error. |
MICROPHONE_FAILED | create() — mic acquisition or publishTrack() failed. The room is disconnected before this is thrown. |
NOT_CONNECTED | sendUserMessage / sendContextualUpdate / internal publish() called while status isn’t connected. |
INVALID_MESSAGE | Routed to onError when an inbound data packet isn’t valid JSON or is missing type. |
DISCONNECTED | Reserved for future use. |
Fatal vs non-fatal
- Fatal errors (connection and microphone failures during
create()) are thrown from thecreate()promise so callers can branch at construction time. - Non-fatal errors (malformed packets, media device errors from LiveKit) are routed to
onError. The session continues.