Rowpass 42501: permission denied for table Not affiliated with Supabase

Rowpass / Guides

42501, PGRST205, 42P01: which error is yours?

Match the code in the response. See its HTTP status and whether a grant is the fix.

Codes you get around a new table

CodeHTTP statusMeaningDoes a grant fix it?
42501401 if the request is not signed in, 403 if it isInsufficient privilege. With permission denied for table the role has no grant.Yes, when the message names a table, sequence, view, function or schema. No, when it names a row-level security policy.
PGRST205404The table in the URL was not found in the schema cache.No. Check the table name, the schema and the project, then reload the schema cache.
42P01404No such table: Postgres has no table by that name.No. The table does not exist where the query looks.
PGRST204400A column named in the columns parameter was not found.No.
PGRST202404A stale function signature, or the function does not exist.No.
42883404No such function in the database.No.
PGRST106406The schema asked for is not in the list of exposed schemas.No. Expose the schema, then grant usage on it.
PGRST301401The JWT could not be decoded or is invalid.No. This is the token, not the table.
PGRST303401JWT claims validation or parsing failed. An expired token lands here, with the message JWT expired.No. This is the token, not the table.
23505409Uniqueness violation.No.
23503409Foreign key violation.No.

Status codes are from the PostgREST error reference (the software behind the Supabase Data API), main branch, read on the date under Sources. A hosted project may run an older release.

401 or 403 for the same missing grant

The same missing grant shows as two different status codes. A signed-out request (role anon) gets 401. A signed-in request (role authenticated) gets 403. Supabase's own troubleshooting page says 42501 errors are often reported by clients as 401 or 403 errors. Neither status means the key is wrong: read the code field in the response body.

Tell the two "not found" cases from a missing grant

What the body saysWhat is trueNext step
"code": "42501" and permission denied for table todosThe table exists and the API can see it. The role may not use it.Grant the role, then add row level security and policies (tool below).
"code": "PGRST205" and Could not find the table 'public.todos' in the schema cacheThe API does not know the table.Check spelling and schema. If the table is new, reload the schema cache.
Status 200 and []Grant present, row level security on, no policy lets these rows through.Add the policy the command needs.

Write the fix for your tables

One table is free. The whole schema with a rollback file is $9 one-time.

 

Waiting for a paste.

    Who can reach each table

    Your tables show up here, one row each, with a choice of who can reach them.

    The SQL appears here as soon as a table is found.

    Parsed in your browser. Your SQL is never uploaded, and no site or database is scanned.

    Questions

    Why do I get 401 when my key is correct?

    Because 42501 from a signed-out request is reported as 401. The key was accepted; the anon role has no grant on the table. A token that cannot be decoded gives PGRST301 instead, and an expired one gives PGRST303 (PostgREST main branch; a hosted project may run an older release).

    Is PGRST205 caused by the 2026 grant change?

    We have not seen an official statement that it is. The documented symptom of a missing grant is 42501 with a hint. PGRST205 means the table name was not found in the schema cache.

    Sources

    Related

    Did it fix your error?