---
sidebar_position: 15
---

# Errors

Every refusal has a short code. In the browser, it is `e.code` of a rejected promise, `{ code }` of an `error` or `realtime:error` event, or a call's `endReason`. On your server, it is a `RealtimeError`'s `code` in Node and Python, and its `errorCode` in PHP. Laravel's broadcasting wraps it in a `BroadcastException`.

## The connection

`rt.on( 'error', ( e ) => … )`, or `connect()` rejecting:

| Code | Why | What to do |
|---|---|---|
| `not_licensed` | WordPlus Cloud doesn't know the app's key | the key is wrong, or the app was deleted |
| `not_included` | the app's grant doesn't include realtime | |
| `wrong_origin` | the page isn't on one of the app's addresses | add the address to the app (scheme, host and port exactly: `http://localhost:3000`, `capacitor://localhost`) |
| `over_capacity` | your apps hold all the connections your account may have at once | serve the worker, so a browser's tabs share one; ask for more |
| `try_later` | a server still starting | the page tries again by itself |
| `bad_request` | the handshake was malformed | |

## Channels

`realtime:error` on a subscription:

| Code | Why |
|---|---|
| `forbidden` | your server said no, or nothing owns the channel |
| `expired`, `bad_token` | the token ran out, or wasn't signed with your app's secret (a secret rotated more than a day ago, say) |
| `bad_channel` | not a channel name the server takes |
| `too_many` | the connection holds 1,000 channels |
| `full` | a presence channel has its 1,000 members |
| `auth_failed` | your auth route didn't answer, or answered an HTTP error |
| `no_auth` | the page has no auth route |
| `timeout`, `server` | the server didn't answer, or failed |

`trigger()` also rejects with `rate_limited`, `bad_event` (not `client-…`), `too_large` or `forbidden`. `realtime:unopened` (`{ event, label }`) is an event the page had no key for, even after asking your keys route.

## Publishing

`RealtimeError` from `publish()`, `publishBatch()` and `channelInfo()`:

| Code | Why |
|---|---|
| `missing_signature`, `stale_signature`, `unknown_site`, `bad_signature` | the signature wasn't taken: a server clock off by more than 5 minutes is `stale_signature`, a wrong secret `bad_signature` |
| `not_included` | the grant doesn't include realtime |
| `bad_request` | no channels, or an event named `realtime:…` |
| `too_many`, `too_large` | over 100 channels or 10 events, or data over 10 KB |
| `unreachable`, `http_<status>` | the server couldn't be reached |

## Calls

From `calls.start()`, `incoming.accept()` and `calls.room()`, from your calls route (`denied`), and as a call's `endReason`:

| Code | Why |
|---|---|
| `forbidden` | your `calls()` callback said no, or nothing owns the call |
| `no_user` | nobody signed in, or a user id that isn't an integer (this version) |
| `not_included` | the grant doesn't include calls |
| `bad_request` | a name the server doesn't take, or calling yourself |
| `bad_token`, `expired` | the token wasn't your app's, or ran out |
| `no_call`, `call_ended`, `answered_elsewhere` | answered too late, or on another device |
| `auth_failed`, `no_auth` | your calls route didn't answer, or the page has none |
| `no_rooms_script`, `rooms_script_failed`, `rooms_script_broken` | the room client isn't served, or didn't load |
| `signaling_unavailable` | the page's connection was down |
