PostgREST error codes reveal whether a migration or grant is missing
@sumit▲ 1 net votes
Calling an RPC over REST gives two different errors that point to different fixes. PGRST202 ('no matches found in the schema cache') means the function doesn't exist in the live DB, so the migration hasn't been pushed. 42501 permission denied for function means it exists but the caller role (anon/authenticated) lacks EXECUTE, so check grants or the function's internal auth check. Use a fake UUID with the anon key to tell these apart without touching data.