Overview
The API returns two categories of errors with different response shapes: HTTP errors and GraphQL errors.
HTTP errors
HTTP errors are returned before GraphQL execution with a standard JSON body. The id field identifies the error type.
401 Unauthorized
Returned when the request is missing credentials or the API key is invalid, expired, or revoked.
{
"title": "Unauthorized. Please include your API credentials",
"id": "unauthorized",
"status": 401
}429 Too Many Requests
Returned when a rate limit is exceeded. This can be triggered by either the request rate limit or the complexity budget.
When the request rate limit is exceeded:
{
"title": "Too many requests",
"id": "too_many_requests",
"detail": "Too many requests",
"status": 429
}When the complexity budget is exhausted:
{
"errors": [
{
"message": "Complexity budget exhausted. Try a less complex query or wait for your budget to restore.",
"extensions": {
"code": "THROTTLED"
}
}
]
}GraphQL errors
GraphQL errors are returned in the response errors array.
400 Bad request
Returned when the request body is not valid JSON.
{
"errors": [
{
"message": "json request body could not be decoded: invalid character 'n' looking for beginning of object key string body:{not json"
}
],
"data": null
}422 Validation error
Returned when the query references a field that does not exist.
{
"errors": [
{
"message": "Cannot query field \"example\" on type \"Network\".",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
],
"data": null
}422 Complexity limit exceeded
Returned when a query's complexity score exceeds the maximum of 750 points. Simplify your query by requesting fewer fields or reducing nesting depth.
{
"errors": [
{
"message": "operation has complexity 812, which exceeds the limit of 750",
"extensions": {
"code": "COMPLEXITY_LIMIT_EXCEEDED"
}
}
],
"data": null
}422 Empty query
Returned when the query string is empty.
{
"errors": [
{
"message": "no operation provided",
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
],
"data": null
}200 Unauthorized error
Returned when the query references a resource that does not exist, that you do not have access to, or when an unexpected error occurs while processing the request.
{
"errors": [
{
"message": "",
"extensions": {
"code": "UNAUTHORIZED"
}
}
],
"data": null
}Need help?
If you run into any issues or have questions, please reach out to our Support Engineering team by opening a ticket via the Dashboard: https://dashboard.meter.com/support