HTTP Status Codes
The Bifrost API uses standard HTTP status codes to indicate the success or failure of a request. Every response returns JSON — even errors.
Overview
Response Examples
The request succeeded. The response body contains the requested data. Note: GraphQL may return 200 even if there are partial errors — always check the errors array in the response.
{
"data": {
"playerStats": {
"kills": 1523,
"deaths": 987,
"winRate": 0.54
}
}
} The request body is malformed or the GraphQL query has syntax errors. Check your query string, variables, and JSON formatting.
{
"errors": [
{
"message": "Syntax Error: Expected Name, found \"}\".",
"locations": [
{
"line": 3,
"column": 1
}
]
}
]
} No valid authentication token was provided. Make sure you include a valid Bearer token in the Authorization header.
{
"errors": [
{
"message": "Not authenticated. Please provide a valid Bearer token.",
"extensions": {
"code": "UNAUTHENTICATED"
}
}
]
} Your token is valid but does not have permission to access this resource. Check your API scopes and subscription tier.
{
"errors": [
{
"message": "You do not have permission to access this resource.",
"extensions": {
"code": "FORBIDDEN"
}
}
]
} You have exceeded the rate limit. Back off and retry after the time indicated in the Retry-After header. See the Rate Limiting page for details.
{
"errors": [
{
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"extensions": {
"code": "RATE_LIMITED",
"retryAfter": 30
}
}
]
} Something went wrong on our end. These are automatically logged and investigated. If the problem persists, contact support.
{
"errors": [
{
"message": "Internal server error.",
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
]
} The API is temporarily unavailable, usually during a deployment or maintenance window. Retry with exponential backoff.
{
"errors": [
{
"message": "Service temporarily unavailable. Please try again later.",
"extensions": {
"code": "SERVICE_UNAVAILABLE"
}
}
]
} GraphQL Error Format
GraphQL has its own error format that lives inside the JSON response body. Even when the HTTP status is 200 OK, the response may contain an errors array alongside partial data.
Always check for the presence of the errors key in the response, even on successful HTTP status codes. Each error object includes:
message— A human-readable description of the errorlocations— Where in the query the error occurredpath— The field path that triggered the errorextensions— Additional metadata, including a machine-readablecode
Example: partial error response (HTTP 200)
{
"data": {
"playerStats": null
},
"errors": [
{
"message": "Player not found: 76561198012345678",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"playerStats"
],
"extensions": {
"code": "NOT_FOUND"
}
}
]
}