© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•8mo ago•
2 replies
Prashant Abbi

Unable to create a new record in a table if RLS is enabled

I'm using Supabase JS (version 2.50.2) and have a test policy for inserts (just one policy for the entire table) on the client table. However, on the below request, I get the following error

POST REQUEST
<base>v1/client?columns=%22name%22%2C%22website_url%22&select=*
<base>v1/client?columns=%22name%22%2C%22website_url%22&select=*


Payload
[
{
"name": "Prashant",
"website_url": "zeroic.in"
}
]

ERROR
{
"code": "42501",
"details": null,
"hint": null,
"message": "new row violates row-level security policy for table "client""
}

However, if RLS is disabled on this table, the insertion happens properly.
Screenshot_2025-06-26_at_3.39.54_PM.png
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Cannot create policy on a legacy table, even if RLS can be enabled
SupabaseSSupabase / help-and-questions
5mo ago
Create a new RLS question.
SupabaseSSupabase / help-and-questions
3y ago
permission denied for rls-enabled table
SupabaseSSupabase / help-and-questions
4y ago
404 on update if rls enabled
SupabaseSSupabase / help-and-questions
4y ago