Catching errors
- Python
- Node.js
- Go
MeshAPIError from inside the iterator.Error field names by language
Error codes
error.code is stable and safe to branch on. The complete list — every code the API
returns, which side of the call it belongs to, and what to do about it — is the
Error Reference.
stream_interrupted is the one code not in that list: the Python and Go SDKs raise it
client-side when a stream drops mid-response (see Automatic retries
below), rather than receiving it from the API.
Automatic retries
Non-streamingcreate() 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.