mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
docs(realtime): document acked broadcast error codes (#51287)
Updates the docs following the changes in https://github.com/supabase/realtime/pull/2280 as part of https://github.com/supabase/realtime/releases/tag/v2.140.9: - Corrects the note on RLS denials not being communicated. It is now returned as an error code (when `ack` is true). - Adds a table of the error codes returned to acknowledged broadcasts. Ref: https://github.com/supabase/realtime/issues/2273 <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions Provide a clear numbered procedure that the PR reviewer can walk through. 1. For example, `Open the live and preview links side-by-side.` 2. For example, `See the issue is fixed.` ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Signed-off-by: Snehil Shah <snehilshah.989@gmail.com> Co-authored-by: Leandro Pereira <leandro@leandro.io>
This commit is contained in:
1 parent
1550b09037
commit
4697c4d836
1 file changed
+16
-1
@@ -939,7 +939,7 @@ The `ids` array on incoming `postgres_changes` payloads must match the subscript
|
||||
|
||||
### Broadcast errors
|
||||
|
||||
Broadcast errors only affect **private channels**. When `config.broadcast.ack` is `false` (the default), all push failures — including size violations and RLS write denials — are silently dropped. RLS denials are always silent regardless of `ack`.
|
||||
Private channels can return every broadcast error code. Public channels return only `payload_size_exceeded`. When `config.broadcast.ack` is `false` (the default), the server sends no reply for any failed push, such as an oversized payload or an RLS write denial.
|
||||
|
||||
When `ack` is `true`, the server replies on error with `response.error` (an atom string), not `response.reason`:
|
||||
|
||||
@@ -947,6 +947,21 @@ When `ack` is `true`, the server replies on error with `response.error` (an atom
|
||||
{ "status": "error", "response": { "error": "payload_size_exceeded" } }
|
||||
```
|
||||
|
||||
| Error code | Description |
|
||||
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| `unauthorized` | The RLS write policy on `realtime.messages` denied the broadcast |
|
||||
| `payload_size_exceeded` | The broadcast payload is larger than the tenant's maximum payload size |
|
||||
| `rls_policy_error` | Error on RLS policy used for authorization |
|
||||
| `query_canceled` | A database query was canceled, usually due to a statement timeout |
|
||||
| `missing_partition` | Realtime was unable to find the expected messages partition |
|
||||
| `unable_to_connect_to_project` | Unable to connect to the project database |
|
||||
| `increase_connection_pool` | The number of connections set for Realtime is not enough for your current use case |
|
||||
| `unable_to_set_policies` | Error when setting up authorization policies |
|
||||
| `unable_to_handle_broadcast` | Error when handling a broadcast message |
|
||||
| `database_lack_of_connections` | Realtime was not able to connect to the tenant's database due to not having enough available connections |
|
||||
| `database_connection_rate_limit_reached` | The rate of attempts to connect to the tenant's database has reached the limit |
|
||||
| `initializing_project_connection` | The connection to the tenant's database is still starting |
|
||||
|
||||
Note that the JS client (`send()`) resolves to the string `'error'` and does not expose the specific `error` atom to callers.
|
||||
|
||||
### Presence errors
|
||||
|
||||
Reference in new issue
Block a user