Skip to content
  1. Extras
  2. mxHeadless
  3. API
  4. Errors

Errors

Failed requests return RFC 9457 (application/problem+json). No {data, meta} wrapper.

Format

json
{
  "type": "https://mxheadless.dev/problems/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Authentication required",
  "instance": "/api/v1/resources",
  "code": "token_required"
}
FieldRole
typeCategory URI
titleShort title
statusHTTP code
detailProduction-safe text
instanceRequest path
codeStable code for clients
errorsOptional: field errors

Codes

codeHTTPWhen
service_disabled503mxheadless_enabled=false
token_required401No credentials
invalid_token401Invalid / expired / revoked
scope_denied403Missing scope
rate_limited429Rate limit
idempotency_conflict409Idempotency-Key conflict
invalid_grant400OAuth rejected

Not every error has a code. For generic handling, use status + type.

HTTP

CodeWhen
400Unsupported media type
401 / 403Auth
404Route or entity
405Method
422Validation, unknown filter/field/sort
429Rate limit
500Server
503Kill switch

When mxheadless_debug=false, responses omit SQL, stack traces, and file paths.