Error format
Prism returns an OpenAI-compatible error envelope:Status codes
Rate limits
For429, wait for the Retry-After delay when present. If the header is
missing, use exponential backoff with jitter.
Retry policy
Retry408, 429, 500, 502, 503, and 504 when the request is safe to
repeat. Do not retry other 4xx responses until you change the request or
credential.
For streaming requests, distinguish between:
- A connection that failed before any content was consumed. Retrying is usually safe.
- A connection that failed after partial content was consumed. Treat the partial generation as interrupted or begin a new turn. Do not silently append a retry to it.
Common fixes
Log the request ID from response headers when reporting a persistent server
error. Never log the API key or full prompts containing secrets.