Error Handling
GraphQL error response format and error codes
Error Handling
Error Response Format
{
"errors": [
{
"message": "Error message",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["Products"],
"extensions": {
"code": "UNAUTHENTICATED"
}
}
],
"data": null
}Common Error Codes
UNAUTHENTICATED- Authentication requiredFORBIDDEN- Insufficient permissionsBAD_USER_INPUT- Invalid inputNOT_FOUND- Resource not foundINTERNAL_SERVER_ERROR- Server error