Errors
Errors communicated by the server over the WebSocket.
error (Server to Client message)
When an error occurs, the server sends an error message in JSON format. For fatal errors, such as sending start_session twice or an internal server error, it then closes the connection (see Ending a session).
The message contains the following fields:
type(required): must beerrormessage(required): explanation of the error
Example:
{
"type": "error",
"message": "`start_session` has been sent twice."
}On the Sync API, errors come back as HTTP status codes instead. See Sync API errors.