Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document error codes in readme/reference docs #1384

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/orange-dots-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-client': minor
---

Add documentation of error codes
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,20 @@ LiveKit is a dynamic realtime environment and calls can fail for various reasons

You may throw errors of the type `RpcError` with a string `message` in an RPC method handler and they will be received on the caller's side with the message intact. Other errors will not be transmitted and will instead arrive to the caller as `1500` ("Application Error"). Other built-in errors are detailed in `RpcError`.

## Error Codes

| Code | Name | Reason |
| ----- | --------------------------- | ------------------ |
| 1 | `ConnectionError` | 0: `NotAllowed`<br>1: `ServerUnreachable`<br>2: `InternalError`<br>3: `Cancelled`<br>4:`LeaveRequest` |
| 10 | `UnsupportedServer` | |
| 12 | `UnexpectedConnectionState` | |
| 13 | `NegotiationError` | |
| 14 | `PublishDataError` | |
| 15 | `SignalRequestError` | |
| 20 | `TrackInvalidError` | |
| 21 | `DeviceUnsupportedError` | |
| 40 | `CryptorError` | |

## Examples

### Demo App
Expand Down
Loading