SQLSTATE 42883undefined_functionHTTP 404
Postgres error 42883: undefined function
function x(unknown) does not exist
No function with that name accepts the argument types given.
Common causes
- The argument types do not match any overload, often untyped literals or text where the function expects uuid or integer.
- The function lives in a schema that is not on search_path (common for extension functions in an extensions schema).
- The extension providing it is not enabled.
How to fix it
- Add casts so the types match the signature (\df name lists signatures).
- Qualify the schema or enable the extension.
Through a REST API
PostgREST, the REST layer behind supabase-js and Scribase, answers HTTP 404 for this error and returns the SQLSTATE in the code field of the JSON error body. PostgREST answers 404 for an RPC call when no function matches the name and the argument names you sent.
Questions
What does Postgres error 42883 mean?
42883 is undefined_function in class 42 (Syntax Error or Access Rule Violation). No function with that name accepts the argument types given.
How do I fix 42883?
Add casts so the types match the signature (\df name lists signatures). Qualify the schema or enable the extension.
What HTTP status does a REST API return for 42883?
PostgREST, the REST layer behind supabase-js, answers 404.