Skip to main content
All SDKs raise or throw a typed exception class when the API returns an error. The exception carries the HTTP status, a machine-readable error code, the request ID, and provider-specific details where applicable.

Catching errors

Mid-stream errors raise the same MeshAPIError from inside the iterator.

Error field names by language

Error codes

Automatic retries

Non-streaming create() requests are retried automatically on 429, 502, 503, and 504 with exponential backoff. The Retry-After header is respected on 429 responses. Streams never retry automatically. If a stream drops mid-response, the client raises an error and you need to restart the request manually. See Streaming — Stream recovery.
max_retries is not the only knob. The full retry policy — status codes, backoff bounds, Retry-After handling, network-error retry — plus a client-side model fallback chain and retry/fallback logging are covered in Resilience.

Configuring retries (Python)