REFERENCE
Errors
Every error has the same body and a stable code. Branch on the code; the message is for developers.
{ "code": "UNAUTHENTICATED", "message": "Sign in again.", "requestId": "0192f0c1-7a3e-7c11-9f0e-5b2d8c1e4a90" }| Code | HTTP | Message | When |
|---|---|---|---|
BAD_REQUEST | 400 | The request could not be read. | Malformed JSON, a bad URL, or any other 4xx the framework raises without a more specific code. |
VALIDATION_FAILED | 400 | The request has invalid fields. | Input failed Zod or route schema validation. `details` lists each field path and problem. |
GRAPHQL_INVALID | 400 | The GraphQL document is invalid. | The query does not parse or does not match the schema (unknown field, wrong argument type). The GraphQL `message` says which. |
UNAUTHENTICATED | 401 | Sign in again. | No session, or the token is missing, expired or invalid. |
FORBIDDEN | 403 | You do not have access to this. | Signed in, but the role or tenant does not allow the action. |
NOT_FOUND | 404 | Not found. | Unknown route, or the record does not exist in this tenant. |
CONFLICT | 409 | This changed since you loaded it. | A write lost an optimistic-lock race, or an idempotency key was reused with a different body. |
METHOD_NOT_ALLOWED | 405 | This method is not allowed here. | A GraphQL endpoint was called with anything but POST. |
PAYLOAD_TOO_LARGE | 413 | The request is too large. | The body is over the route limit. |
UNSUPPORTED_MEDIA_TYPE | 415 | This content type is not supported. | The `content-type` header names a type the route does not parse. |
QUERY_TOO_COMPLEX | 400 | This request asks for too much at once. | A GraphQL operation is deeper than 8 levels, costs more than its audience allows, or has more than 2,000 tokens. `details` gives the depth and cost against their limits. Ask for fewer fields or a smaller page. |
QUERY_TIMEOUT | 503 | This took too long. | An operation did not finish its database work within 5 s. Its work is cancelled, but a write may already have committed: retry a mutation only with the same idempotency key. |
RATE_LIMITED | 429 | Too many requests. Try again shortly. | The caller went over a rate limit. |
INTERNAL | 500 | Something went wrong on our side. | Any error Core did not expect. The cause is logged with the request id; the response never carries it. |