Error shape
The top-level error object.
HTTP status codes
Robust error handling
Operational guidance
- Log HTTP status, error
type, errorcode, endpoint, model, attempt number, and latency. - Redact
Authorization, prompts, tool arguments, image URLs, audio content, and user data according to your privacy policy. - Set connect and total timeouts; a network request without a timeout can consume workers indefinitely.
- Retry only temporary failures and cap the total time spent retrying.
- Treat streamed responses as partial until the terminal event or
[DONE]marker arrives.