Router Errors

Error and status codes returned by GraphOS Router and Apollo Router Core


Learn about error codes and HTTP response status codes returned by GraphOS Router and Apollo Router Core.

Status codes

CodeDescription
400
Bad request

A request failed GraphQL validation or failed to be parsed.
401
Unauthorized

Requests may receive this response in two cases:
  • For a client request that requires authentication, the client's JWT failed verification.
  • For a non-client subscription endpoint calling a subscription callback URL, the router couldn't find a matching subscription identifier between its registered subscriptions and a subscription event.
405
Method not allowed

 note
Both mutations and subscriptions must use POST.
406
Not acceptable

A request's HTTP Accept header didn't contain any of the router's supported mime-types:
  • application/json
  • application/graphql-response+json
  • multipart/mixed;deferSpec=20220824
  • multipart/mixed;subscriptionSpec=1.0.
429
Too many requests

Request traffic exceeded configured rate limits. See client side traffic shaping.
499
Request canceled by client

The request was canceled because the client closed the connection, possibly due to a client side timeout.
500
Internal server error

The router encountered an unexpected issue. Report this possible bug to the router team.
504
Request timed out

The request was not able to complete within a configured amount of time. See client side traffic shaping timeouts.
 note
You can create Rhai scripts that throw custom status codes. See Terminating client requests to learn more.

Error codes

Demand control

Errors returned by the router when demand control is enabled.

CodeDescription
COST_ESTIMATED_TOO_EXPENSIVE
The estimated cost of the query was greater than the configured maximum cost.
COST_ACTUAL_TOO_EXPENSIVE
The actual cost of the query was greater than the configured maximum cost.
COST_QUERY_PARSE_FAILURE
The query could not be parsed.
COST_RESPONSE_TYPING_FAILURE
The response from a subgraph did not match the GraphQL schema.
Feedback

Edit on GitHub

Forums