SupabaseS
Supabase4y ago
jxyz

DELETE user_role RLS fails silently instead of returning RLS error to user

We encountered this days ago but we ignored it at the time because manual browser-side checks can still prevent the end-user from encountering this bug.

Simply put our RLS on INSERT works as expected, but our same RLS on DELETE just fails silently.

INSERT returns 403 Forbidden with the correct error message "new row violates row-level security policy for table user_roles".

DELETE however returns 200 OK with empty response body.

The pic attached show these two RLS policies, which kinda boggles us on why the result is inconsistent.

https://github.com/joshxyzhimself/template7/issues/1
unknown.png
Was this page helpful?