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

Realtime RLS Broadcasts Errors #50

Open
Tracked by #215
w3b6x9 opened this issue Dec 29, 2021 · 2 comments
Open
Tracked by #215

Realtime RLS Broadcasts Errors #50

w3b6x9 opened this issue Dec 29, 2021 · 2 comments
Labels
enhancement New feature or request Stale

Comments

@w3b6x9
Copy link
Member

w3b6x9 commented Dec 29, 2021

Realtime RLS will be broadcasting database changes with errors so that clients can capture what went wrong when listening to database changes.

Please see here for the current error states: https://github.com/supabase/walrus/tree/generic_claims#error-states.

Realtime RLS will broadcast errors as either null (no errors) or an array of strings (at least one error present).

Here are two example Realtime RLS JSON payloads with errors:

{
      "columns": [{"name": "id", "type": "int8"}, {"name": "details", "type": "text"}],
      "commit_timestamp": "2021-12-28T23:59:38.984538+00:00",
      "schema": "public",
      "table": "todos",
      "type": "UPDATE",
      "old_record": {"details": "previous test", "id": 12, "user_id": 1},
      "record": {"details": "test...", "id": 12, "user_id": 1},
      "errors": ["Error 413: Payload Too Large"]
}
{
      "columns": [],
      "commit_timestamp": null,
      "schema": "public",
      "table": "todos",
      "type": "UPDATE",
      "old_record": {},
      "record": {},
      "errors": ["Error.."]
}

Notice:

  • columns will always be an array but can be empty
  • commit_timestamp will either be a string or null
  • old_record/record will always be an object but can be empty
@J0
Copy link
Collaborator

J0 commented Jan 23, 2023

Woah it's been a while - I'm going to move this to the realtime-py repo so this can be taken into consideration for the realtime-py RFC

@J0 J0 transferred this issue from supabase/supabase-py Jan 23, 2023
Copy link
Contributor

github-actions bot commented May 2, 2024

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the Stale label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

3 participants