ReadonlykindAlways 'WSError' — note the capitalization, which does not match the class name.
Optional ReadonlyoriginalThe error or value that caused this one, when the SDK was wrapping something else.
For a NetworkError this is the browser's own fetch rejection. It is not
serialized as-is: toJson() takes only an Error cause's
message.
Serializes the error into the JSON-safe ErrorJson payload for logging or reporting.
The payload always carries kind and the message. The cause's message
is added only when originalError is an Error and says
something the message does not, truncated to 256 characters; any other cause is dropped.
Subclasses extend the payload with the fields listed on their own pages.
The error as plain, JSON-serializable data.
The web socket the SDK uses for chat notifications failed to connect.
Talks (V2) and Clips (V3) sessions open a web socket alongside the video stream; the agent's answer arrives over it as
partialandanswerevents, which is what drives onNewMessage. This error is raised when that socket emits anerrorevent, once per failed attempt while connect() is retrying. It is only delivered to onError and never thrown, so there is nothing to catch aroundconnect()for it; if every attempt fails,connect()rejects with the browser's own socket event instead.The socket is not opened at all for Expressive (V4) agents, which receive the same events over the LiveKit data channel, nor in DirectPlayback mode, so the error cannot occur in either case.
kind is
'WSError', and the message is'Websocket failed to connect'.