Unlike the rest of the PeachDesk API (which uses a detail field тАФ see API Errors), the BRAHMA v1/* routes return errors in the OpenAI error format, so OpenAI SDKs raise their native typed exceptions unchanged.

Error envelope

Every non-2xx response from the BRAHMA routes has this shape:

Status codes

Request IDs

Every BRAHMA response тАФ success or error тАФ carries an x-request-id header of the form req_<hex>:
Log it with your requests, and quote it in support requests so the exact request can be traced.

Handling errors

  • Retry 429 with exponential backoff and jitter, honoring the retry-after header тАФ see Rate Limits.
  • Retry 5xx with exponential backoff тАФ transient server errors can resolve on retry.
  • Do not retry 401 or 404 тАФ these indicate problems with your request that will not self-resolve.
  • Branch on code, not message тАФ messages are human-readable and may change; codes are stable.