SQLSTATE 3D000invalid_catalog_nameHTTP 400
Postgres error 3D000: invalid catalog name
database "x" does not exist
The connection names a database that is not on this server.
Common causes
- A typo or the wrong database name in the connection string (many hosted services use postgres or a project-specific name).
- The database was dropped, or you are pointed at the wrong server or branch.
How to fix it
- List databases with \l in psql, connected to an existing one.
- Copy the connection string from the dashboard instead of building it by hand.
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 3D000 mean?
3D000 is invalid_catalog_name in class 3D (Invalid Catalog Name). The connection names a database that is not on this server.
How do I fix 3D000?
List databases with \l in psql, connected to an existing one. Copy the connection string from the dashboard instead of building it by hand.
What HTTP status does a REST API return for 3D000?
PostgREST, the REST layer behind supabase-js, answers 400.