# WTError

## Field Summary <a href="#field-summary" id="field-summary"></a>

| Type   | Field                                  |
| ------ | -------------------------------------- |
| Int    | code - *Error code*                    |
| String | localizedDescription - *Error message* |

## User Error codes <a href="#user-error-codes" id="user-error-codes"></a>

| Codes | Errors                | Description                                                                                                                                                                                                          |
| ----- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 101   | userGeneric           | <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>                                        |
| 102   | userNotFound          | <ul><li>Attempting to execute request before joining the Session</li><li>Addressing client that is not in the Session</li></ul>                                                                                      |
| 103   | userClosedError       | <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>                                                      |
| 104   | existingUserInSession | A Participant tries to join a Session with a name that already exists                                                                                                                                                |
| 105   | userNotStreaming      | <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> |
| 106   | userNotAuthorized     | <ul><li>Attempting to send synchronization data while not having a synchronizer role</li><li>Invalid oldParticipantSecret during reconnection</li></ul>                                                              |

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

| Codes | Errors              | Description                                                                                                                                                                      |
| ----- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 201   | sessionGenericError | <ul><li>Unable to handle the request as the Session is locked </li><li>Active requests counter underflow (Internal server logic)</li><li>The Session is already locked</li></ul> |
| 203   | sessionClosed       |                                                                                                                                                                                  |
| 206   | sessionIsFull       | Exceeded limit of streaming participants in the room                                                                                                                             |

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

| Codes             | Errors                                | Description                                                                                                                                                                   |
| ----------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 303               | mediaEndpoint                         | <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> |
| <p></p><p>308</p> | MEDIA\_AUDIO\_PERMISSION\_ERROR\_CODE | Microphone permission is not granted                                                                                                                                          |
| <p></p><p>309</p> | MEDIA\_VIDEO\_PERMISSION\_ERROR\_CODE | Camera permission is not granted                                                                                                                                              |

## Transport Error codes <a href="#transport-error-codes" id="transport-error-codes"></a>

| Codes | Errors            | Description                                                                                |
| ----- | ----------------- | ------------------------------------------------------------------------------------------ |
| 801   | transportRequest  | Failed to make request to media node                                                       |
| 802   | transportResponse | Invalid response from media node                                                           |
| 803   | transport         | <ul><li>Request method is not supported</li><li>Invalid or missing request field</li></ul> |

## Generic Error codes <a href="#generic-error-codes" id="generic-error-codes"></a>

| Codes | Errors                 | Description                                                                       |
| ----- | ---------------------- | --------------------------------------------------------------------------------- |
| -1    | unknownError           | Internal server error                                                             |
| 901   | genericConnectionError | The Client closed the connection in the middle of the process of joining the room |
| 999   | genericError           | The Request is not supported                                                      |

## Token Errors <a href="#token-errors" id="token-errors"></a>

| Codes | Errors               | Description                                 |
| ----- | -------------------- | ------------------------------------------- |
| 1100  | invalidTokenExpired  | Token is expired                            |
| 1101  | invalidToken         | Token string is not full or incorect input  |
| 1102  | invalidTokenData     | Token string is not full or incorect format |
| 1103  | invalidTokenJsonData | Token not contains all required data        |

## Socket Erros <a href="#socket-erros" id="socket-erros"></a>

| Codes | Errors            | Description                      |
| ----- | ----------------- | -------------------------------- |
| 1104  | invalidSocketURL  | Url to socket in invalid         |
| 1105  | invalidStunServer | Stun server field is not correct |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.sceenic.co/watch-together-sdk/sscale-confluence-api-references/ios-swift-reference-new/error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
