Error structure
Each error contains:- Code: A predefined identifier for programmatic handling
- Message: A human-readable description for display or logging
Error handling
Servers can send errors in three ways:- HTTP response body (failed requests)
- Within a failed run
- As events in a stream error
Guidance
When handling errors:- Use the code for programmatic decisions
- Use the message for display or logging
- Tailor your response to your application type