{
"$comment": "Fusion Stack error codes, shared by every server package. Edit here, then run npm run spec:sync. status is the HTTP status the code is sent with, and description what the code means, for API docs; fallbacks name the code for an HTTP error that has no more specific one: by exact status, then server for any other 5xx, then default.",
"codes": [
{
"code": "bad_request",
"status": 400,
"title": "Bad Request",
"description": "The request is malformed, such as a body that is not valid JSON."
},
{
"code": "unauthenticated",
"status": 401,
"title": "Unauthorized",
"description": "No credentials were sent, or they are invalid or revoked. Send a valid API key as a bearer token."
},
{
"code": "forbidden",
"status": 403,
"title": "Forbidden",
"description": "The credentials are valid but do not allow this request."
},
{
"code": "insufficient_scope",
"status": 403,
"title": "Insufficient scope",
"description": "The API key lacks a scope the endpoint requires. The error's meta lists the required scope."
},
{
"code": "not_found",
"status": 404,
"title": "Not Found",
"description": "The resource or route does not exist, or is not visible to this client."
},
{
"code": "method_not_allowed",
"status": 405,
"title": "Method Not Allowed",
"description": "The route does not accept this HTTP method."
},
{
"code": "conflict",
"status": 409,
"title": "Conflict",
"description": "The request conflicts with the current state of the resource."
},
{
"code": "validation_failed",
"status": 422,
"title": "Validation failed",
"description": "The request body failed validation. Each error points at the field at fault."
},
{
"code": "rate_limited",
"status": 429,
"title": "Too many requests",
"description": "Too many requests. Wait for the seconds in Retry-After before trying again."
},
{
"code": "invalid_api_version",
"status": 400,
"title": "Invalid API version",
"description": "The Api-Version header is not a known, released version."
},
{
"code": "api_version_retired",
"status": 410,
"title": "API version retired",
"description": "The requested API version is retired. Upgrade to a supported version."
},
{
"code": "api_version_brownout",
"status": 410,
"title": "API version temporarily unavailable",
"description": "The requested API version is deprecated and briefly unavailable, as a warning before its sunset."
},
{
"code": "endpoint_unavailable_for_version",
"status": 410,
"title": "Endpoint unavailable for this API version",
"description": "The endpoint cannot serve the requested API version. Use a newer version for this endpoint."
},
{
"code": "invalid_include",
"status": 400,
"title": "Invalid include",
"description": "The include parameter names a relationship the endpoint does not allow, or is nested too deeply."
},
{
"code": "invalid_fieldset",
"status": 400,
"title": "Invalid sparse fieldset",
"description": "A fields parameter names a type or field the endpoint does not allow."
},
{
"code": "invalid_filter",
"status": 400,
"title": "Invalid filter",
"description": "A filter names a field or operator the endpoint does not allow."
},
{
"code": "invalid_sort",
"status": 400,
"title": "Invalid sort",
"description": "The sort parameter names a field the endpoint cannot sort by."
},
{
"code": "invalid_page",
"status": 400,
"title": "Invalid page parameter",
"description": "A page parameter is invalid, such as a page size over the maximum or an unknown cursor."
},
{
"code": "invalid_idempotency_key",
"status": 400,
"title": "Invalid idempotency key",
"description": "The Idempotency-Key header is empty or too long."
},
{
"code": "idempotency_key_mismatch",
"status": 422,
"title": "Idempotency key reused",
"description": "The Idempotency-Key was already used for a different request. Use a new key."
},
{
"code": "idempotency_in_progress",
"status": 409,
"title": "Request in progress",
"description": "A request with this Idempotency-Key is still running. Retry once it finishes."
},
{
"code": "http_error",
"status": 400,
"title": "HTTP error",
"description": "An HTTP error without a more specific code."
},
{
"code": "server_error",
"status": 500,
"title": "Internal Server Error",
"description": "An unexpected server error. Retrying may succeed; quote the request ID when reporting it."
},
{
"code": "service_unavailable",
"status": 503,
"title": "Service Unavailable",
"description": "The API is temporarily unavailable, such as during maintenance. Retry later."
}
],
"fallbacks": {
"400": "bad_request",
"401": "unauthenticated",
"403": "forbidden",
"404": "not_found",
"405": "method_not_allowed",
"409": "conflict",
"422": "validation_failed",
"429": "rate_limited",
"503": "service_unavailable",
"server": "server_error",
"default": "http_error"
}
}