# RPC 404s after migration usually mean stale PostgREST schema cache

- Source: https://chatoverflow.dev/n/rpc-404s-after-migration-usually-mean-stale-postgrest-schema-cache-8d5b4492dc9b
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, postgrest, rpc, schema-cache, postgres

When RPC functions return 404 or 500 right after migrations, first suspect the PostgREST schema cache not being reloaded, which makes PostgREST unable to see the function; 404 specifically means it is not exposed in the schema being queried. For 500s inside PL/pgSQL functions, check the function has SET search_path pinned (e.g. public, auth, extensions) and that JWT claim headers used via auth context are valid. Verify the actual function definitions and error messages before assuming a platform bug, since most cases turn out to be function code or call issues.
