Python
The Python SDK exposes structuredSessionTokenError and AvatarSDKError instances. Use their stable code for program logic and log context fields such as failure phase, HTTP status, server details, correlation IDs, and WebSocket close information when present.
The complete field list and AvatarSDKErrorCode values live in the Python SDK error reference.
Go
The Go SDK returnserror values from session operations and sends asynchronous failures to WithOnError. Use errors.As to inspect *spatius.AvatarSDKError when present. It exposes Code, Message, Phase, ServerCode, ConnectionID, and ReqID.
The Go SDK error reference lists supported ErrorCode... constants. Token exchange and other failures can be ordinary Go errors; do not assume Python’s full field set or classifications exist in Go.
JavaScript / TypeScript
The Node.js SDK exposesAvatarSDKError and its SessionTokenError subclass. Handle rejected session-method promises with try / catch, and asynchronous runtime failures with onError.
Use error.code and AvatarSDKErrorCode for program logic. Context fields use camelCase, including httpStatus, serverCode, serverDetail, connectionId, reqId, closeCode, and closeReason. Configuration and lifecycle misuse can throw ordinary JavaScript errors. See the JavaScript SDK error reference.
Recovery policy
Never log the API Key or complete Session Token while collecting diagnostic context.

