actionbook avatar

M13 Domain Error

This is a design-level guide for thinking through error handling strategy before you write code. It pushes you to answer "who needs to handle this error and how should they recover?" before choosing error types. The categorization tables break down user-facing versus internal errors, transient versus permanent, and map each to recovery patterns like retry with backoff or circuit breakers. What I like here is the trace up/trace down structure: it connects error design to domain constraints above (like SLA requirements) and implementation patterns below (thiserror, tokio-retry). The quick reference on retry, fallback, and bulkhead patterns is practical. Sits at Layer 2, so it's about design choices rather than code mechanics.

skills.sh installs
3.5K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

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

Installs 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 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

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Debugging, Rust, Design & UI/UX
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Recommended

More Debugging
1anthropics avatarperformance-reviewanthropics/knowledge-work-pluginsStructure a performance review with self-assessment, manager template, and calibration prep. Use when review season kicks off and you need a self-assessment tem3.4Kskills.sh installs
2microsoft avatarmemory-leak-auditmicrosoft/vscodeAudit code for memory leaks and disposable issues. Use when reviewing event listeners, DOM handlers, lifecycle callbacks, or fixing leak reports. Covers addDisp3.2Kskills.sh installs
3anthropics avatarperformance-reportanthropics/knowledge-work-pluginsBuild a marketing performance report with key metrics, trend analysis, wins and misses, and prioritized optimization recommendations. Use when wrapping a campai3.1Kskills.sh installs
4cursor avatarfix-merge-conflictscursor/pluginsResolve merge conflicts non-interactively, validate build and tests, and finalize conflict resolution2.8Kskills.sh installs
5mapbox avatarmapbox-web-performance-patternsmapbox/mapbox-agent-skillsPerformance optimization patterns for Mapbox GL JS web applications. Covers initialization waterfalls, bundle size, rendering performance, memory management, an2.5Kskills.sh installs
6sickn33 avatarweb-performance-optimizationsickn33/antigravity-awesome-skillsweb performance optimization2.4Kskills.sh installs