Skip to main content
Every Atlas API error — validation, auth, not-found, rate limit, or an unexpected bug — comes back in a single, predictable shape. Clients can rely on one envelope everywhere.

The envelope

{
  "code": "validation_error",
  "message": "Validation failed"
}
FieldTypeDescription
codestringA stable, machine-readable code. Branch on this.
messagestringA human-readable description. Display, don’t parse.
Always branch on code, never on message. Messages may change for clarity; codes are part of the contract.

Common codes

HTTP statuscodeWhen
400bad_requestMalformed request.
401unauthorizedMissing or invalid credentials.
403forbiddenAuthenticated but not allowed.
404not_foundThe resource doesn’t exist (or isn’t yours).
422validation_errorThe request failed schema validation.
429rate_limitedToo many requests; back off and retry.
500internal_errorAn unexpected server error.
Unexpected server errors return a generic internal_error with no internal details — the underlying cause is logged server-side, never leaked to the client.

The MCP surface is different

The MCP server speaks JSON-RPC 2.0, so its failures stay inside the JSON-RPC error envelope at HTTP 200 rather than using the REST envelope above. See MCP transport for the JSON-RPC error codes.