What problem does it solve?
Reduce runtime surprises and make debugging and recovery predictable by enforcing early validation, clear exception semantics, and strategies for partial failures so systems remain observable and resilient.
Core Features & Use Cases
- Early input validation: Validate at API boundaries to fail fast and return actionable error messages.
- Convert to domain types: Parse external strings into enums and typed domain objects to centralize validation.
- Meaningful exceptions & mapping: Use specific built-in exceptions, custom domain exceptions, and include contextual messages for easier diagnosis.
- Exception chaining & preservation: Chain exceptions to retain the original root cause for debugging.
- Batch processing with partial failures: Capture per-item successes and failures so a single error does not abort the entire job.
- Pydantic integration & progress reporting: Use Pydantic for complex schemas and provide progress callbacks for long-running batches.
- Use Case: Validate and process incoming API payloads, convert fields to domain types, and run a bulk import that reports per-row errors without stopping the whole import.
Quick Start
Use the python-error-handling skill to validate inputs at API boundaries, convert external data to domain types, and return structured batch results with per-item errors.