SQLSTATE 3F000invalid_schema_nameHTTP 400
Postgres error 3F000: invalid schema name
schema "x" does not exist
A statement or search_path names a schema that has not been created.
Common causes
- Creating objects in a schema before it exists.
- Restoring a dump of one schema into a database that lacks the schemas it references (for example an extensions schema).
How to fix it
- create schema if not exists x; before the objects that use it.
- Restore dependencies first, or include them in the dump.
Through a REST API
PostgREST, the REST layer behind supabase-js and Scribase, answers HTTP 400 for this error and returns the SQLSTATE in the code field of the JSON error body.
Questions
What does Postgres error 3F000 mean?
3F000 is invalid_schema_name in class 3F (Invalid Schema Name). A statement or search_path names a schema that has not been created.
How do I fix 3F000?
create schema if not exists x; before the objects that use it. Restore dependencies first, or include them in the dump.
What HTTP status does a REST API return for 3F000?
PostgREST, the REST layer behind supabase-js, answers 400.