Error Codes
When making a request to our API, there may be times when an error is returned. This page provides a list of common error codes and their meaning, along with examples of the error response. Each error code includes the error message, the path or location of the error, and the error code. Understanding these error codes can help you troubleshoot issues with your API requests and ensure they are formed correctly.
If you are unable to resolve an error, please get in touch on Discord
Common errors include:
Not authorized
If you do not have a key and want to use our data, you can obtain a valid authentication key here
{
"message": "you should be authenticated to do this request",
"extensions": {
"code": 401
}
}
Error code: 401
This error is returned when the request is not authorized.
To resolve this error, ensure that you have provided a valid authentication key with your request. The key should be included in the X-API-KEY
header.
If you are using a client library, the library may provide a helper method or field for setting the token.
If you have a token and are still receiving a 401 error, also get in touch to check that the token has not expired and that your account still has permission to make the requested API call.
If you continue to have issues, reach out via Discord.
User not found
{
"message": "user not found",
"extensions": {
"code": 401
}
}
Error code: 401
This error is returned when the X-API-KEY
contained a key that is not known to us; the user is not found.
To resolve this error, ensure that you have provided a valid authentication key with your request.
If you are still having issues, consider reaching out via Discord for assistance.
Additionally, it is also possible that your account may have been deactivated or suspended, so it may be necessary to contact us and check your account status.
Missing limit parameter
The limit
parameter is required for all queries that return a list of items.
See the Limit section for more information.
:::
{
"message": "unable to parse paging argument: limit field is required",
"path": ["assets"],
"extensions": {
"code": 400
}
}
Error code: 400
This error is returned when the limit
parameter is missing from the request.
The "path"
field contains the (sub)query that caused the error.
To resolve this error, make sure to add the limit parameter and set it to a value that is appropriate for your use case.
Exceeding maximum limit
Ideally you should set the limit to the minimum value that is appropriate for your use case.
{
"message": "unable to parse paging argument: max limit is 500",
"path": ["metrics"],
"extensions": {
"code": 400
}
}
Error code: 400
This error is returned when the limit
parameter exceeds the maximum allowed value of 500.
To resolve this error, make sure to set the limit parameter to a value that is less than or equal to 500.
Invalid argument
{
"message": "Cannot query field \"metricss\" on type \"Query\". Did you mean \"metrics\"?",
"locations": [
{
"line": 2,
"column": 3
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
Error code: "GRAPHQL_VALIDATION_FAILED"
This error is returned when the query contains an invalid argument. In this case, it's a typo in the query: metricss
instead of metrics
.
To resolve this error, you will need to correct the typo in the argument and make sure that you are querying for a valid object or field.
The error message provides a suggestion on the correct spelling of the field, which in this case is metrics
.
If you are still unsure, you can refer to the [Schema]((/api-docs/schema/schema) for a list of available objects, a link to their fields and their correct spelling.
If the error persists, please check if the query syntax is correct.
Variable type mismatch
{
"message": "Int cannot represent non-integer value: \"1\"",
"locations": [
{
"line": 2,
"column": 47
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
Error code: "GRAPHQL_VALIDATION_FAILED"
This error is returned when the query contains a variable with a type that does not match the type of the argument. In this case, the limit
argument is expecting an integer, but the variable is a string.
To resolve this error, you will need to make sure that the variable type matches the type of the argument.
Maximum query depth exceeded
{
"message": "query path is too long. Max depth is 2",
"path": ["providers", "rewardOptions", "validators", "metrics"],
"extensions": {
"code": 400
}
}
Error code: 400
This error is returned when the query contains too many nested fields. In this case, the query contains 4 nested fields, which exceeds the maximum depth of 2. To resolve this error, you will need to make sure that the query does not contain more than 2 nested fields.
Operation not found
{
"message": "operation not found"
}
This error is returned when the query contains an operation that is not supported. It may be missing a query to specify what type of operation the client intends to perform. In other words, the request doesn't have any specific action to take on our API. (In this case, the body was empty.)
To resolve this error, you will need to make sure that the body contains a valid query.
Field Conflict
{
"errors": [
{
"message": "Fields \"assets\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.",
"locations": [{ "line": 7, "column": 3 }],
"extensions": { "code": "GRAPHQL_VALIDATION_FAILED" }
}
],
"data": null
}
This error is returned when the query contains two fields with the same name, but different arguments.
In this case, the query contains two assets
fields, but one of them has a limit
argument, while the other does not.
To resolve this error, you will need to make sure that the query does not contain two fields with the same name, but different arguments.