playbackSession > sessionError

The sessionError event in the playbackSession namespace indicates the session error status, such as failures to join and evictions.


Parameters

See the Control documentation for descriptions of parameters in the header. See the table below for descriptions of parameters in the body.

Parameters Type Value
errorCode string The session error. See the list below.
reason string The reason for the error. This string is optional, so it may not always be returned. It is in English and not localized. Your app should only use it for debugging purposes.
sessionId string The identifier for the session.

Session Errors

Value Definition
ERROR_SESSION_IN_PROGRESS Indicates that your app could not establish a session. This can occur if there is an existing session or if any other source is currently playing.
ERROR_SESSION_JOIN_FAILED Indicates that your app did not successfully join an existing session. This can occur if the appId and appContext doesn’t match the session your app is attempting to join or if there is no current session.
ERROR_SESSION_EVICTED Indicates that the session ended and your app was kicked out. This can occur if another app created a new session or if your app selected a different playback source. Sonos delivers this error to all subscribers of the existing session.

Example