Easily restore your project to a previous version with our new Instant One-click Backup Recovery
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
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's 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.

#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.

You'll get a 429 when you exceed the rate limit, and you will get a response with the following payload:

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

#500: Internal server error

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