Help teams manage content creation and approval in a clear and structured way
Hygraph
Docs

#Errors

#Overview

Hygraph uses conventional HTTP responses codes when returning API requests.

Codes in the 2xx range refer to a successful request, whereas responses in the 4xx range indicate there was an error due to the information you provided, such as invalid query arguments, or auth token.

CodeDescription
200OK - Successful response
400Bad request - Typically due to invalid query arguments
401Unauthorized - Usually no valid Permanent Auth Token was provided
402Payment required - Typically due to an expired trial or API/assetTraffic exceeded
403Unauthorized request - The user needs more permissions
404Not Found - Typically invalid endpoint or environment requested
413Payload too large - Your request size exceeds the allowed limit
429Too many requests - You're making too many requests, slow down
500Internal Server Error - Something went wrong on our side

A typical GraphQL error will look like the below. The format of the error is typical for any 400 query or mutation request.

{
"errors": [
{
"message": "input:1: Field \"idd\" is not defined by type PostWhereInput. Did you mean id?\n"
}
],
"data": null,
"extensions": {
"requestId": "ckff8k1tc0nsg0150cssdkzxm"
}
}

It is clear from the error above that the field idd is not part of the Input Type.

#400: Bad request

Hygraph will return a 400 if there is an error with the request. 400 errors are typically thrown when there is a client-side validation error, such as a missing required argument in your GraphQL query, or a malformed Permanent Auth Token.

#401: Unauthorized

The endpoint you requested requires a valid Permanent Auth Token, or a environment may not exist for this project.

#402: Payment required

Exceeding the API operations and/or the asset traffic limit results in the API being blocked until the new billing period starts.

Queries will return the following 402 error:

You have exceeded the limits of your project's subscription. To continue using your API, please enable billing under your project's settings to allow for overlimit billing.

You may also get this error after a trial period has expired.

#403: Unauthorized request

The user needs more permissions for either the Content API or the Management API.

#413: Payload too large

To ensure delivery of optimal experiences to all customers, an API limit is enforced for request sizes on all GraphQL queries for the shared regions. The rate limiting depends on the current load of the shared region and the subscription plan. These limits can be lifted on dedicated clusters and enterprise plans. Please contact sales for further information.

You'll get a 413 when you exceed the limit for request size, and you will get a response with the following payload:

{
"errors": [
{
"message": "Payload Too Large"
}
],
"data": null
}

To resolve this issue, reduce the size of your GraphQL query or mutation.

#429: Too many requests

To ensure delivery of optimal experiences to all customers, a rate limit is enforced on all GraphQL queries for the shared regions. The rate limiting depends on the current load of the shared region and the subscription plan. These limits can be lifted on dedicated clusters and enterprise plans. Please contact sales for further information.

You'll get a 429 error when you exceed the rate limit.

For exceeding the number of requests per second limit, you will get a response with the following payload:

{
"errors": [
{
"message": "Too Many Requests"
}
],
"data": null
}

To resolve this issue, retry the request after a brief delay.

For exceeding the concurrent requests limit, you will get a response with the following payload:

{
"errors": [
{
"message": "Concurrent operations limit exceeded"
}
],
"data": null
}

To resolve this issue, reduce the volume of your concurrent requests.

#500: Internal server error

500s errors could happen in multiple scenarios, whenever there's something wrong on our side.