error-handling-patterns

Explain error handling patterns across Python, TypeScript, Rust, and Go.

6|2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/amurata/cc-tools --skill error-handling-patterns-amurata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/amurata/cc-tools/tree/main/plugins/developer-essentials/skills/error-handling-patterns
Command: npx skills add https://github.com/amurata/cc-tools --skill error-handling-patterns-amurata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers implement robust error handling strategies across various programming languages to build more reliable and fault-tolerant applications.

Core Features & Use Cases

  • Language-Specific Patterns: Provides examples for Python, TypeScript/JavaScript, Rust, and Go.
  • Universal Patterns: Covers Circuit Breaker, Error Aggregation, and Graceful Degradation.
  • Best Practices & Pitfalls: Offers guidance on effective error management and common mistakes to avoid.
  • Use Case: When encountering a recurring network error in a microservice, you can use the Circuit Breaker pattern to prevent cascading failures and implement graceful degradation by falling back to cached data.

Quick Start

Use the error-handling-patterns skill to learn about implementing custom exception hierarchies in Python.

Frequently Asked Questions about error-handling-patterns

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

FAQPage Schema
How do I implement a circuit breaker pattern to prevent cascading failures in a microservice?

A circuit breaker pattern prevents cascading failures by halting requests to a failing service and implementing graceful degradation, such as falling back to cached data during recurring network errors. This approach isolates faults and maintains application stability during outages.

What is the best way to handle errors in Rust and Go compared to Python exceptions?

Error handling in Rust and Go relies on Result types and explicit error values rather than traditional exceptions used in Python. This Skill provides language-specific implementations for each, detailing error propagation and custom exception hierarchies to ensure robust fault tolerance across different programming paradigms.

How do I create a custom exception hierarchy in Python for better debugging?

Creating a custom exception hierarchy in Python involves defining domain-specific exception classes that inherit from a base exception, which improves debugging by categorizing errors precisely. This Skill offers guidance on structuring these hierarchies and avoiding common error management pitfalls.

Does this error handling guidance apply to TypeScript and JavaScript applications?

Yes, this error handling guidance applies to TypeScript and JavaScript applications, providing specific patterns for error propagation and fault tolerance. It covers language-specific implementations alongside universal patterns like error aggregation to build resilient applications across multiple environments.

When should I use error aggregation instead of failing fast on the first exception?

Error aggregation should be used instead of failing fast when you need to collect multiple validation or processing errors simultaneously to report them together. This universal design pattern improves user feedback and debugging by preventing cascading failures and supporting graceful degradation.

What are common pitfalls when implementing fault tolerance and resilience patterns?

Common pitfalls in implementing fault tolerance include swallowing exceptions without logging, overusing catch-all handlers, and misconfiguring circuit breaker thresholds. This Skill details best practices for effective error management to avoid these mistakes and ensure robust application reliability.