loom-error-handling

Solid

Error handling patterns and strategies including Rust Result/Option, API error responses, data pipeline errors, and security-aware handling. Use for exception handling, error recovery, retry logic, circuit breakers, fallbacks, graceful degradation, error taxonomy, and designing error hierarchies.

Data & Documents 53 stars 0 forks Updated today MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Error Handling ## Overview Cross-language error-handling reference. The recurring mistakes are not syntactic: swallowing errors, retrying non-idempotent operations, losing the cause chain when wrapping, leaking internals in API responses, and log-and-rethrow double logging. This skill leads with the decision rules an expert applies, then shows the minimum code to implement each. ## Agent Delegation - **loom-senior-software-engineer** (Opus) — DEFAULT. Error architecture, strategy choice, secure handling (no info leak), infra resilience (retry/circuit breaker/fallback). - **loom-software-engineer** (Sonnet) — ONLY boilerplate error types / unit tests following an established pattern. ## Error Taxonomy — Classify First Every failure is exactly one of three kinds; the kind dictates handling: | Kind | Meaning | Handle by | | --- | --- | --- | | **Expected / recoverable** | Invalid input, not-found, transient network/rate-limit | Return a typed error (`Result`/checked exception); retry only if transient AND idempotent | | **Bug / programmer error** | Broken invariant, unreachable state, index OOB | Fail loud: `panic!`/assert/throw. Do NOT try to recover — it hides the bug | | **Fatal / environmental** | OOM, disk full, config missing at startup | Fail fast at the boundary; crash cleanly, let the supervisor restart | ⚠ Do not model expected failures as panics/exceptions-for-control-flow, and do not swallow bugs into a recoverable path. Rust encodes this split directly: `R...

Details

Author
cosmix
Repository
cosmix/loom
Created
8 months ago
Last Updated
today
Language
Rust
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category