The Error object

The single error format.

{
  "error": {
    "code": "rate_limited",
    "message": "Too many requests in a short time. Try again in a minute.",
    "fields": [{ "path": "cursor", "code": "invalid_string" }],
    "requestId": "req_ab12cd34"
  }
}

fields only appears for validation errors. message can be translated; code stays stable — build your logic on code, not text. Full details: Errors.