error-handling

Diagnose failures and design resilient error handling using a 6-phase debugging protocol.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/joySUSY/violet-plugin-place --skill error-handling-joysusy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/joySUSY/violet-plugin-place/tree/main/plugins/error-handling
Command: npx skills add https://github.com/joySUSY/violet-plugin-place --skill error-handling-joysusy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Debugging by guesswork wastes time and produces fragile fixes. This Skill replaces trial-and-error with an evidence-based methodology for root-causing failures, designing error types, and building recovery architectures across Rust, Python, Go, TypeScript, and Java. ## Core Features & Use Cases - 6-Phase Debugging Protocol: Systematic workflow from evidence collection through root cause analysis (ACH), precise locating, systematic fixing, validation, and quality gates. - Error Taxonomy & Philosophy: A 13-category error classification with fail-fast vs. graceful degradation guidance and 5 severity levels for logging decisions. - Resilience Patterns: Ready-to-use implementations of retry with exponential backoff, circuit breakers, transactional rollback, and typed domain errors. - Use Case: A production API returns 500 errors only under load. Activate the debugging protocol to reproduce the failure, form competing hypotheses (connection pool exhaustion vs. missing env vars), discriminate with evidence, and ship a verified fix with a regression test. ## Quick Start Ask the assistant to debug a failing test or production error using the error-handling debugging protocol and produce an evidence-based root cause diagnosis.

Frequently Asked Questions about error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a failing test systematically instead of guessing?▼

Follow the 6-phase debugging protocol: collect evidence with verbose test output, form competing hypotheses (ACH), locate the exact file and line, fix all occurrences, re-run the failing test, then run the full suite to confirm zero regressions.

What is the best way to design error types for a new API?▼

Use typed, domain-specific errors such as a Rust enum with thiserror or a Python exception hierarchy. Each error should include what failed, where, why, and actionable fix instructions rather than vague messages like "invalid input".

How do I handle flaky external API calls in production?▼

Combine retry with exponential backoff for transient failures and a circuit breaker to fast-fail when a downstream service is down. This prevents cascading failures and avoids overwhelming an already struggling dependency.

Should I use fail-fast or graceful degradation for errors?▼

Fail fast for critical constraints like invalid config at boot, security violations, or data corruption risks. Degrade gracefully for auxiliary services like recommendations or analytics so users can still complete their primary task.

Is it safe to use unwrap() in Rust production code?▼

No. Production code should propagate errors with the ? operator and typed Results. unwrap() is acceptable only in tests and doc examples, and expect() only when failure is a logically impossible invariant violation.

Why should stack traces never appear in API error responses?▼

Stack traces leak internal paths, queries, and implementation details to external actors. Return a generic message with a request ID to clients, and log the full trace securely in internal systems like CloudWatch or ELK.