error-handling - Design resilient error handling for production Python
Defines Python exception hierarchies, preserves error context, adds graceful fallbacks and retries, and formats API failures with RFC 7807 Problem Details.
Tags
Updated: 2026-11-08Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Define exception hierarchies
- Propagate chained error context
- Implement graceful fallbacks
- Structure RFC 7807 responses
- Configure exponential backoff retries
- Document raised exceptions
Inputs
- Python source code
- External dependency behavior
- API error contracts
- Failure handling requirements
Outputs
- Exception handling code
- Fallback execution paths
- RFC 7807 error responses
- Retry configurations
- Error handling documentation
- Error handling tests
Requirements
- OpenCode-compatible environment
