
M13 Domain Error
Domain error handling strategy resource for Rust developers designing error types and recovery mechanisms. It addresses who needs to handle errors (end users, developers, or operations) and how to categorize them (transient vs. permanent, user-facing vs. internal) to determine appropriate recovery strategies like retries, fallbacks, and circuit breakers. The skill solves the problem of inconsistent error handling across application layers by providing a framework that connects domain requirements to implementation patterns.
- skills.sh installs
- 738
- GitHub stars
- 1.3K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add zhanghandong/rust-skills --skill m13-domain-error --agent claude-codeInstalls into .claude/skills of the current project.
Files
Domain Error Strategy
Layer 2: Design Choices
Core Question
Who needs to handle this error, and how should they recover?
Before designing error types:
- Is this user-facing or internal?
- Is recovery possible?
- What context is needed for debugging?
Error Categorization
| Error Type | Audience | Recovery | Example |
|---|---|---|---|
| User-facing | End users | Guide action | InvalidEmail, NotFound |
| Internal | Developers | Debug info | DatabaseError, ParseError |
| System | Ops/SRE | Monitor/alert | ConnectionTimeout, RateLimited |
| Transient | Automation | Retry | NetworkError, ServiceUnavailable |
| Permanent | Human | Investigate | ConfigInvalid, DataCorrupted |
Thinking Prompt
Before designing error types:
-
Who sees this error?
- End user → friendly message, actionable
- Developer → detailed, debuggable
- Ops → structured, alertable
-
Can we recover?
- Transient → retry with backoff
- Degradable → fallback value
- Permanent → fail fast, alert
Sponsors
Details
- Repository
- github.com/zhanghandong/rust-skills
- Categories
- Debugging, Rust
More from zhanghandong/rust-skills
All 34- Rust Trait Explorer731
- Rust Code Navigator728
- Unsafe Checker726
- Domain Cli709
- Rust Symbol Analyzer702
- Rust Call Graph699
- Rust Router698
- Rust Learner688
- Rust Deps Visualizer684
- Rust Skill Creator670
- Domain Web648
- Meta Cognition Parallel635
- Rust Daily635
- Domain Embedded625
- Domain Cloud Native596
- Domain Fintech581
- Domain Ml573
- Domain Iot568
- M15 Anti Pattern5.6K
- Coding Guidelines1.2K
- M10 Performance895
- M07 Concurrency844
- M06 Error Handling827
- Rust Refactor Helper821