Skip to content
中文

Error codes

Management endpoints return domain codes; both table endpoints return PostgREST codes. HTTP status and retryability are listed below.

Domain code HTTP PostgREST code Retryable
SINGULAR_MISMATCH 406 PGRST116 no
AMBIGUOUS_EMBED 300 PGRST201 no
EMBED_NOT_FOUND 400 PGRST200 no
INVALID_PREFERENCE 400 PGRST122 no
QUERY_CANCELED 500 57014 no
RANGE_NOT_SATISFIABLE 416 PGRST103 no
NOT_ACCEPTABLE 406 PGRST107 no
OPERATOR_TYPE_MISMATCH 400 42883 no
DATABASE_NOT_FOUND 404 PGRST125 no
TABLE_NOT_FOUND 404 PGRST205 no
FIELD_NOT_FOUND 400 42703 no
VALIDATION_FAILED 400 23514 no
UNIQUE_VIOLATION 409 23505 no
REFERENCE_RESTRICT 409 23503 no
FIELD_TYPE_IMMUTABLE 400 — no
LIMIT_EXCEEDED 400 54000 no
UNSUPPORTED 400 PGRST127 no
INVALID_PARAMS 400 PGRST100 no
DATABASE_INVALID_STATE 409 — no
CAPACITY 503 — yes
NOT_IMPLEMENTED 501 PGRST127 no
BINDING_READ_ONLY 403 — no
DATABASE_KIND_MISMATCH 409 — no
KEY_NOT_FOUND 404 — no
KV_COMMAND_ERROR 400 — no

DATABASE_KIND_MISMATCH appears only on the deprecated paths. On the typed paths, reaching a database through the other type’s path returns 404 DATABASE_NOT_FOUND, the same as an unknown id.

Retryable does not mean repeating the same request will succeed. For 57014, narrow the query or change its filters before retrying.

Management endpoint error body

Response example — HTTP 400

{
"code": "FIELD_TYPE_IMMUTABLE",
"message": "field type is immutable",
"details": null,
"hint": null
}

Table endpoint error body

Response example — HTTP 400

{
"code": "PGRST127",
"message": "operator fts is not supported",
"details": null,
"hint": null
}

The code, message, details and hint fields are always present; details and hint can be null.

Unavailable service error body

Response example — HTTP 501

Header Value
x-should-retry false
{
"code": "not_implemented",
"message": "auth is not provided by praxis-database"
}

These five services return not_implemented directly; this differs from the NOT_IMPLEMENTED domain code in the table.

Correct the request using error details

Only id is a reserved field name. New field names cannot start with _, which is reserved for system metadata. created_at, updated_at and version are ordinary user field names. Datetime fields can use "now()" as a default.

details identifies the field or JSON path and the received value. Batch validation includes a zero-based row index. Values are limited to 80 characters; the entire row is never echoed. hint suggests a correction, or is null when no suggestion applies. This example omits the required title in row 2:

{
"code": "23514",
"message": "row validation failed",
"details": "row 1: title: required value (got null)",
"hint": "Rows in one insert are filled to the union of their keys with null (PostgREST behavior). Send every key in every row, or send Prefer: missing=default to use field defaults."
}

A unique conflict returns 409, for example:

{
"code": "23505",
"message": "unique constraint violated",
"details": "Key (email)=(a@b.c) already exists.",
"hint": null
}