Skip to main content

Error handling

All examples assume an authenticated request — see Authentication for getting and using a token.

GraphQL errors

GraphQL errors appear in the errors array alongside a null data field. Each error includes a message and an extensions.code:

{
"errors": [
{
"message": "Credential not found",
"extensions": {
"code": "NOT_FOUND"
}
}
],
"data": null
}

Always check for errors before reading data. A response can contain both — for example, a partial success where some fields resolved and others did not.

Common error codes

CodeMeaningAction
UNAUTHENTICATEDToken missing, expired, or invalidRequest a new token and retry
FORBIDDENToken valid but insufficient permissionsVerify the associated user's roles
NOT_FOUNDThe requested resource does not existCheck the ID in your request
BAD_USER_INPUTInvalid argument or input valueCheck arguments against the operation reference

Token endpoint errors

Errors from POST /oauth/token use the OAuth 2.0 error format — a JSON object with error and error_description fields, not a GraphQL errors array:

{
"error": "invalid_client",
"error_description": "Invalid client credentials"
}
CodeCauseResolution
invalid_clientWrong client_id, wrong client_secret, or expired clientCheck error_description for details; if the client has expired, ask an administrator to rotate the secret
invalid_requestMissing required parametersInclude grant_type, client_id, and client_secret
unsupported_grant_typeOnly client_credentials is supportedUse "grant_type": "client_credentials"

HTTP status codes

StatusMeaningAction
400 Bad RequestMalformed request or invalid inputCheck request body and headers
401 UnauthorizedAuthentication failedRequest a new token
403 ForbiddenAuthenticated but insufficient permissionsVerify user roles
404 Not FoundEndpoint or resource not foundCheck the URL and resource ID
429 Too Many RequestsRate limit exceededSee Rate limiting
500 Internal Server ErrorUnexpected server errorRetry with exponential backoff; contact support if the issue persists