Skip to main content

Errors and Problem Details

Zen Mesh APIs use standard HTTP status codes and return structured error responses following RFC 9457 (Problem Details).

HTTP Status Codes

CodeMeaningTypical Cause
200OKRequest succeeded
201CreatedResource created
400Bad RequestInvalid parameters or body
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient scope
404Not FoundResource does not exist
409ConflictResource state conflict
422Unprocessable EntityValidation failure
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected server error
503Service UnavailableTemporary outage or maintenance

Problem Details Format

{
"type": "https://docs.zen-mesh.io/errors/invalid-parameters",
"title": "Invalid Parameters",
"status": 422,
"detail": "destination_id must be a valid UUID",
"instance": "/tenants/tnt_abc123/destinations",
"errors": [
{
"field": "destination_id",
"message": "must be a valid UUID",
"code": "invalid_uuid"
}
]
}

Error Types

Type URITitleStatus
/errors/authenticationAuthentication Required401
/errors/insufficient-scopeInsufficient Scope403
/errors/not-foundResource Not Found404
/errors/conflictResource Conflict409
/errors/invalid-parametersInvalid Parameters422
/errors/rate-limitedRate Limit Exceeded429
/errors/internal-errorInternal Error500

Common Error Scenarios

Missing API Key

{"title": "Authentication Required", "status": 401, "detail": "X-API-Key header is required"}

Invalid Scope

{"title": "Insufficient Scope", "status": 403, "detail": "Scope 'mcp:admin:keys' required but key has 'mcp:read:*'"}

Rate Limited

{"title": "Rate Limit Exceeded", "status": 429, "detail": "Rate limit of 100 req/min exceeded. Retry after 45s"}

Retry After

Ratelimited responses include a Retry-After header (seconds). Clients should respect this before retrying. See Rate Limits and Operational Limits.