# ErrorsListeners

## Public method Summary <a href="#sessionerror-publicconstructorsummary" id="sessionerror-publicconstructorsummary"></a>

| Methods                                                                                   | Parameters                      |
| ----------------------------------------------------------------------------------------- | ------------------------------- |
| <p>onSessionError(fn)</p><p><em>Event listener for handling session availability</em></p> | Fired when Session has an error |

## Session error codes <a href="#session-error-codes" id="session-error-codes"></a>

| Codes | Errors                                       | Description                                                                                                                                                                                                          |
| ----- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 206   | SESSION\_IS\_FULL\_ERROR\_CODE               | Exceeded limit of streaming participants in the room                                                                                                                                                                 |
| 204   | SESSION\_CANNOT\_BE\_CREATED\_ERROR\_CODE    |                                                                                                                                                                                                                      |
| 203   | SESSION\_CLOSED\_ERROR\_CODE                 |                                                                                                                                                                                                                      |
| 201   | SESSION\_GENERIC\_ERROR\_CODE                |                                                                                                                                                                                                                      |
| 107   | USER\_VIDEO\_PERMISSION\_DENIED\_ERROR\_CODE | Occurs when a user that was not granted permission for using web camera tries to join a session                                                                                                                      |
| 108   | USER\_AUDIO\_PERMISSION\_DENIED\_ERROR\_CODE | Occurs when a user that was not granted permission for using microphone tries to join a session                                                                                                                      |
| 106   | USER\_NOT\_AUTHORIZED\_ERROR\_CODE           | <ul><li>Attempting to send synchronization data while not having a synchronizer role</li><li>Invalid oldParticipantSecret during reconnection</li></ul>                                                              |
| 105   | USER\_NOT\_STREAMING\_ERROR\_CODE            | <ul><li>Attempting to start a stream with no video and audio</li><li>Attempting to send SDP response when there was no offer</li><li>Attempting to subscribe to a client that did not publish anything yet</li></ul> |
| 104   | EXISTING\_USER\_IN\_SESSION\_ERROR\_CODE     | A Participant tries to join a Session with a name that already exists                                                                                                                                                |
| 103   | USER\_CLOSED\_ERROR\_CODE                    | <ul><li>Source or target user has left the Session during the media subscription process</li><li>Target user has left the Session during SDP exchange</li></ul>                                                      |
| 102   | USER\_NOT\_FOUND\_ERROR\_CODE                | <ul><li>Attempting to execute request before joining the Session</li><li>Addressing client that is not in the Session</li></ul>                                                                                      |
| 101   | USER\_GENERIC\_ERROR\_CODE                   | <ul><li>Invalid participant type</li><li>Target client is not is not available while in the process of media (un)subscription</li><li>ICE candidates queue overflow</li></ul>                                        |

## Media error codes <a href="#media-error-codes" id="media-error-codes"></a>

| Codes | Errors                       | Description                                                                                                                                                                   |
| ----- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 303   | MEDIA\_ENDPOINT\_ERROR\_CODE | <ul><li>Already subscribed to media stream from target client</li><li>SDP exchange for this media stream is already in progress</li><li>Timeout during SDP exchange</li></ul> |

## Token error codes

| Codes | Errors                      | Description                                          |
| ----- | --------------------------- | ---------------------------------------------------- |
| 1100  | TOKEN\_EXPIRED              | <ul><li>Token expired</li></ul>                      |
| 1101  | TOKEN\_DATA\_IS\_NOT\_VALID | <ul><li>Token data missing required fields</li></ul> |
