actionbook avatar

M13 Domain Error

Layered error-handling guide that sorts errors by audience and recovery path, with Rust examples.

skills.sh installs
3.6K
GitHub stars
1.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers error categorization for end users, developers, ops, and automation, plus transient versus permanent recovery patterns
  • Includes a thiserror error hierarchy with a is_retryable() check and an exponential-backoff retry helper built on tokio-retry
  • Lists recovery patterns for retry, fallback, circuit breaker, timeout, and bulkhead, along with common mistakes and anti-patterns
  • Designed for Rust developers designing error types and resilience behavior, with trace links to related skills

Install

$ npx -y skills add actionbook/rust-skills --skill m13-domain-error -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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 TypeAudienceRecoveryExample
User-facingEnd usersGuide actionInvalidEmail, NotFound
InternalDevelopersDebug infoDatabaseError, ParseError
SystemOps/SREMonitor/alertConnectionTimeout, RateLimited
TransientAutomationRetryNetworkError, ServiceUnavailable
PermanentHumanInvestigateConfigInvalid, DataCorrupted

Thinking Prompt

Before designing error types:

  1. Who sees this error?

    • End user → friendly message, actionable
    • Developer → detailed, debuggable
    • Ops → structured, alertable
  2. Can we recover?

    • Transient → retry with backoff
    • Degradable → fallback value
    • Permanent → fail fast, alert

Details

Repository
github.com/actionbook/rust-skills
Categories
Rust, Backend & APIs
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Similar to M13 Domain Error

More Rust