Docs

query_timeout

504 api_error. The database stopped the query at the statement timeout.

View as Markdown
HTTP statustypeSurfaces
504api_errorREST, GraphQL

What it means

The database stopped the query at the statement timeout. Later root fields were not run.

WhenWhat the hint tells you
the read hit the server-side statement timeout (5 seconds by default)narrow the filter, expand fewer relations or request a smaller limit, then retry

What to do

Ask for fewer entries or fewer nested relations, or filter on fewer relation hops.

The response

HTTP 504:

{
  "error": {
    "type": "api_error",
    "code": "query_timeout",
    "message": "The query took too long.",
    "docs": "https://docs.capacms.com/errors/query_timeout"
  },
  "meta": {
    "version": "2026-10-01",
    "contract": 1,
    "requestId": "req_0f3c…"
  }
}

On GraphQL

/api/graphql answers the same code inside errors[].extensions. The status depends on the Accept header you send (status codes):

application/jsongraphql-response+jsonWhen
200200a root field hit the statement timeout; it and every later root field are null

See also