Skip to content

Commit

Permalink
review updates - language
Browse files Browse the repository at this point in the history
  • Loading branch information
saudsami committed Jul 5, 2024
1 parent fa574f9 commit bf53e35
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions shared/video-sdk/reference/error-codes/web-error-codes.mdx
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
## Common error codes

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| `UNEXPECTED_ERROR` | An unhandled, unexpected error. Usually this error will have a specific error message. | None |
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `UNEXPECTED_ERROR` | An unhandled, unexpected error. Usually, this error will have a specific error message. | Refer to the specific error message. |
| `UNEXPECTED_RESPONSE` | The server returned an unexpected response. This error is usually thrown when a network problem causes the state of the client to be inconsistent with that of the server. | Wait for the network to stabilize and retry the operation. |
| `INVALID_PARAMS` | Illegal parameters. | Follow the specific prompts to confirm the operation and pass the correct parameters according to the documentation. |
| `NOT_SUPPORTED` | The browser does not support it. | |
| `INVALID_OPERATION` | Illegal operation, usually because the operation cannot be performed in the current state. | Confirm the order of operations, for example, please confirm that you have joined the channel before publishing. |
| `NOT_SUPPORTED` | The browser does not support the feature. | |
| `INVALID_OPERATION` | Illegal operation. Usually occurs because the operation cannot be performed in the current state. | Confirm the order of operations. For example, confirm that you have joined the channel before publishing. |
| `OPERATION_ABORTED` | The operation is aborted, usually due to poor network quality or disconnection that causes communication failure with the <Vg k="COMPANY" /> server | Confirm the local network status through the `AgoraRTCClient.on("user-joined")` callback and retry the operation. |
| `WEB_SECURITY_RESTRICT` | Browser security policy restrictions. | Make sure the web page is running in a [secure environment](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts). |
| `NO_ACTIVE_STATUS` | The <Vg k="COMPANY" /> project is inactive or disabled. | Please go to the <Vg k="COMPANY" /> console to confirm that the project status is enabled. |
| `WEB_SECURITY_RESTRICT` | Browser security policy restriction. | Make sure the web page is running in a [secure environment](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts). |
| `NO_ACTIVE_STATUS` | The <Vg k="COMPANY" /> project is inactive or disabled. | Go to the <Vg k="COMPANY" /> console to confirm that the project status is enabled. |

## Request-related error codes

### Network connection

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `NETWORK_TIMEOUT` | The request times out, usually because communication with the <Vg k="COMPANY" /> server fails due to poor network quality or a broken connection. | Confirm the local network conditions with the `AgoraRTCClient.on("user-joined")` callback and retry the operation. |
| `NETWORK_RESPONSE_ERROR` | Response error, typically an illegal status code. | Verify that the parameters for the operation are correct and pass in the correct parameters according to the documentation. |
| `NETWORK_ERROR` | Unlocatable network error. | None. |

### SDK internal requests

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| `WS_ABORT` | WebSocket disconnected during a request to the <Vg k="COMPANY" /> Web server. | Listen to the `AgoraRTCClient.on("connection-state-change")` event and retry after the connection state changes to `CONNECTED`. |
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `WS_ABORT` | WebSocket disconnected during a request to the <Vg k="COMPANY" /> server. | Listen to the `AgoraRTCClient.on("connection-state-change")` event and retry after the connection state changes to `CONNECTED`. |
| `WS_DISCONNECT` | WebSocket is disconnected before requesting the <Vg k="COMPANY" /> Server | Listen to the `AgoraRTCClient.on("connection-state-change")` event and retry after the connection state changes to `CONNECTED`. |
| `WS_ERR` | An error occurred in the WebSocket connection. | Check the current browser support for WebSocket. |

### Device management related error codes

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `ENUMERATE_DEVICES_FAILED` | Failed to enumerate local devices, usually due to browser limitations. | None. |
| `DEVICE_NOT_FOUND` | The specified device could not be found. | Pass in the correct device ID. |

### Track-related error codes

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| `TRACK_IS_DISABLED` | The track is disabled, usually because the track has `Track.setEnabled(false)` set. | Call `Track.setEnabled(true)` on the track before proceeding. |
| `SHARE_AUDIO_NOT_ALLOWED` | The end user did not click Share Audio when the audio was shared on the screen. | Require the end user to check Share Audio in the screen sharing pop-up window. |
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `TRACK_IS_DISABLED` | The track is disabled, usually because `Track.setEnabled()` is set to `false`. | Call `Track.setEnabled(true)` on the track before proceeding. |
| `SHARE_AUDIO_NOT_ALLOWED` | The end user did not click **Share Audio** when the audio pop-up was presented on the screen. | Prompt the end user to check **Share Audio** in the screen sharing pop-up window. |
| `MEDIA_OPTION_INVALID` | Unsupported parameters for media capture. | Modify the media capture parameters or use the SDK's preset configuration. |
| `CONSTRAINT_NOT_SATISFIED` | Unsupported parameters for media capture. | Modify the media capture parameters or use the SDK's preset configuration. |
| `PERMISSION_DENIED` | Permission to obtain media device was denied. | Select Allow in the Get Device Permissions pop-up window. |
| `PERMISSION_DENIED` | Permission to obtain media device was denied. | Select **Allow** in the Get Device Permissions pop-up window. |
| `NOT_READABLE` | The user is authorized, but the media device is not accessible. | Check the current capture device and driver for errors. |
| `FETCH_AUDIO_FILE_FAILED` | Failed to download online audio file. | Fill in the correct online audio address and make sure it can be accessed properly. |
| `READ_LOCAL_AUDIO_FILE_ERROR` | Failed to read local audio file. | Fill in the correct local audio file path. |
| `DECODE_AUDIO_FILE_FAILED` | Audio file decoding fails, probably because the audio file is encoded in an encoding format that is not supported by the browser WebAudio. | Check whether the browser WebAudio supports the encoding format of the audio file. |
| `READ_LOCAL_AUDIO_FILE_ERROR` | Failed to read the local audio file. | Fill in the correct local audio file path. |
| `DECODE_AUDIO_FILE_FAILED` | Audio file decoding failed, probably because the audio file is encoded in an encoding format that is not supported by the browser WebAudio. | Check whether the browser WebAudio supports the encoding format of the audio file. |

## Client-related error codes

### Join the channel

The following table lists the error codes thrown by the SDK when joining a channel fails:

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `UID_CONFLICT` | Duplicate UIDs in the same channel. | Use a different UID to enter the channel. |
| `INVALID_UINT_UID_FROM_STRING_UID` | The String UID allocation service returned an illegal int UID. | Use a different UID to enter the channel. |
| `CAN_NOT_GET_PROXY_SERVER` | Unable to get the cloud proxy service address. | None. |
| `CAN_NOT_GET_GATEWAY_SERVER` | Unable to get <Vg k="COMPANY" /> server address. | None. |

### Publish/Unpublish

The following table lists the error codes thrown by the SDK when publishing or unpublishing fails:
The following table lists the error codes thrown by the SDK when publishing or unpublishing a track fails:

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| `INVALID_LOCAL_TRACK` | An illegal LocalTrack was passed in. | Check the incoming Track and pass in the correct LocalTrack. |
| `CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS` | A Client publishes multiple video tracks. | A Client can only publish one video track at a time. If you want to publish multiple video tracks, please create multiple Clients. |
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `INVALID_LOCAL_TRACK` | An illegal `LocalTrack` was passed in. | Check the incoming track and pass in the correct `LocalTrack`. |
| `CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS` | A Client publishes multiple video tracks. | A Client can only publish one video track at a time. If you want to publish multiple video tracks, create multiple clients. |

### Subscribe/Unsubscribe

The following table lists the error codes thrown by the SDK when subscribing or unsubscribing fails:

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| `INVALID_REMOTE_USER` | Illegal remote users. It may be that the remote user is not in the channel or has not posted any media tracks yet. | Perform subscription only after receiving the `AgoraRTCClient.on("user-published")` event. |
| `REMOTE_USER_IS_NOT_PUBLISHED` | The remote user has posted an audio or video track that does not match the type specified in your subscribe operation. | Ensure that the track type passed in by the subscribe operation needs to be the same as that given by the `AgoraRTCClient.on("user-published")` event, or confirm before subscribing that the remote user has published that type of track via `AgoraRTCRemoteUser.hasVideo` and `AgoraRTCRemoteUser.hasAudio`. |
| `ERR_TOO_MANY_BROADCASTERS` | The number of anchors in the channel exceeds the limit. | Control the number of anchors. For example, call `Client.setClientRole` only when the user needs to publish an audio/video track to switch the user role to host. |
| `ERR_TOO_MANY_SUBSCRIBERS` | The number of hosts subscribed to by the current user exceeds the limit. | Subscribe to anchors on demand. |
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `INVALID_REMOTE_USER` | Illegal remote user. The remote user is not in the channel or has not posted any media tracks yet. | Subscribe only after receiving the `AgoraRTCClient.on("user-published")` event. |
| `REMOTE_USER_IS_NOT_PUBLISHED` | The remote user has posted an audio or video track that does not match the type specified in your subscribe operation. | Ensure that the track type passed in by the subscribe operation is the same as that returned by the `AgoraRTCClient.on("user-published")` event, or confirm before subscribing that the remote user has published the type of track using `AgoraRTCRemoteUser.hasVideo` or `AgoraRTCRemoteUser.hasAudio`. |
| `ERR_TOO_MANY_BROADCASTERS` | The number of hosts in the channel exceeds the limit. | Control the number of hosts. For example, call `Client.setClientRole` only when the user needs to publish an audio/video track to switch the user role to host. |
| `ERR_TOO_MANY_SUBSCRIBERS` | The number of hosts subscribed to by the current user exceeds the limit. | Subscribe to hosts on demand. |

### Push streaming to CDN
### Pushing stream to CDN

The following table lists the error codes thrown by the SDK when pushing a stream to a CDN fails:

| Error code | Description | Approach |
|:--:|:------------------------------|:------------------------|
| Error code | Description | Resolution |
|:----|:------------------------------|:------------------------|
| `LIVE_STREAMING_TASK_CONFLICT` | The push flow task already exists. | Call `Client.stopLiveStreaming` to stop this push streaming task before resuming the push streaming operation. |
| `LIVE_STREAMING_INVALID_ARGUMENT` | Push flow parameter error. | Refer to the API documentation for `Client.startLiveStreaming` to check the parameters of the push streaming operation. |
| `LIVE_STREAMING_INTERNAL_SERVER_ERROR` | Push stream server internal error. | Retry the push stream operation, if it still fails, refresh the page and try again. |
| `LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED` | The push stream URL is occupied. | Check if the filled in URL is occupied. |
| `LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED` | The push stream URL is occupied. | Check if the specified URL is occupied. |
| `LIVE_STREAMING_CDN_ERROR` | There is an error in the target CDN of the push flow, causing the push flow to fail. | Confirm the health of the target CDN. |
| `LIVE_STREAMING_INVALID_RAW_STREAM` | Push flow timeout. | Confirm that the target stream exists. |

Expand All @@ -101,9 +101,9 @@ The following table lists the error codes thrown by the SDK when pushing a strea
The following table lists the error codes thrown by the SDK when cross-channel connectivity fails:

| Error code | Description |
|:--:|:------------------------------|
|:----|:------------------------------|
| `CROSS_CHANNEL_WAIT_STATUS_ERROR` | An error occurred while waiting for the `AgoraRTCClient.on("channel-media-relay-state")` callback. |
| `CROSS_CHANNEL_FAILED_JOIN_SRC` | Failed to initiate a cross-channel media stream forwarding request. |
| `CROSS_CHANNEL_FAILED_JOIN_DEST` | Failed to accept a cross-channel media stream forwarding request. |
| `CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST` | The server failed to receive a cross-channel forwarded media stream. |
| `CROSS_CHANNEL_SERVER_ERROR_RESPONSE` | The server responded with an error.
| `CROSS_CHANNEL_SERVER_ERROR_RESPONSE` | The server responded with an error. |

0 comments on commit bf53e35

Please sign in to comment.