Errors

Error response format, HTTP status codes, and validation error structure.

The Core API returns errors as JSON with a consistent shape. The code field is the HTTP status, repeated in the body for clients that don’t have easy access to the response status code.

Common error responses

{ "code": 401, "message": "Unauthorized" }
{ "code": 404, "message": "Not found" }
{
  "code": 422,
  "message": "Validation Error",
  "errors": [
    { "field": "start", "location": "body", "messages": ["is required"] }
  ]
}

Validation errors (422)

Validation failures return 422 with an errors array. Each entry has:

What about the Metrics API?

WebSocket errors are returned as JSON within the standard response frame format (see Metrics API overview). The shape mirrors the REST error format above — a code and a message, optionally an errors array for validation failures.