Skip to content

Errors

We return GraphQL responses for all of our error responses. These responses will contain an error code to indicate the type of error along with a descriptive message.

{
"errors": [
{
"message": "Authentication failed",
"locations": [],
"path": [
"protectedAction"
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception" : {
//If any
}
}
}
],
}

The field extensions.code contains the error code for each error type and is a string.

Error TypeError CodeDescription
Syntax ErrorGRAPHQL_PARSE_FAILEDWhen the input request to the API results in a malformed GraphQL object definition to the input type, graphQL throws a syntax error.
Validation ErrorGRAPHQL_VALIDATION_FAILEDWhen the input request to the API fails GraphQL type checking on request object, graphQL throws a validation error.
Authentication ErrorUNAUTHENTICATEDWhen the basic authentication token passed through the header is invalid and hence the user cannot be authenticated, we throw an authentication error.
UserInput ErrorBAD_USER_INPUTWhen the input request to the API contains values for the fields that is invalid, we throw a user input error.
Rate Limiting ErrorTOO_MANY_REQUESTSWhen the number of requests to the API has exceeded the limit, we throw a too many requests error.
AlreadyExists ErrorALREADY_EXISTSWhen trying to create a record that breaks some uniqueness constraint.
Unhandled ErrorINTERNAL_SERVER_ERRORThis will happen if our server is a degraded state.