Error Handling
WebSocket responses include structured error objects. Differentiate between connection-level failures and recoverable synthesis issues.
Unrecoverable Errors
Connection handshake or authentication failures close the socket immediately.
Typical causes: invalid token, plan lacks WebSocket access, network filtering.
Recoverable Errors
Synthesis-level problems keep the socket open so your client can retry.
Handle recoverable errors by logging error_name, inspecting error_params, and prompting the user to resend a corrected payload.
