error-handling-patterns

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

3|2|Updated Aug 31, 2025
One-click install
npx skills add https://github.com/donggyun112/ai-librarian --skill error-handling-patterns-donggyun112
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/donggyun112/ai-librarian/tree/main/.claude/skills/error-handling-patterns
Command: npx skills add https://github.com/donggyun112/ai-librarian --skill error-handling-patterns-donggyun112

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers master error handling patterns across various programming languages to build more resilient and reliable applications.

Core Features & Use Cases

  • Understand Error Philosophies: Differentiate between exceptions, Result types, error codes, and Option/Maybe types.
  • Implement Language-Specific Patterns: Learn idiomatic error handling in Python, TypeScript/JavaScript, Rust, and Go.
  • Apply Universal Patterns: Implement Circuit Breaker, Error Aggregation, and Graceful Degradation.
  • Use Case: When debugging a complex distributed system, use this Skill to understand how to implement a circuit breaker pattern to prevent cascading failures and how to aggregate errors from multiple microservices for better diagnostics.

Quick Start

Explain the difference between exceptions and Result types in error handling.

Frequently Asked Questions about error-handling-patterns

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

FAQPage Schema
What is the difference between exceptions and Result types for error handling?

Exceptions interrupt normal execution flow using throw/catch blocks, while Result types represent operational success or failure as explicit values, forcing developers to handle potential errors directly without hidden control flow jumps.

How do I implement a circuit breaker pattern to prevent cascading failures in microservices?

Implement a circuit breaker to monitor microservice calls, temporarily blocking requests when failure thresholds are exceeded. This prevents cascading failures by failing fast and allowing dependent services to recover gracefully.

What are the idiomatic error handling patterns in Rust and Go?

Rust uses Result types for explicit error propagation without exceptions, while Go returns error values alongside normal return values, requiring explicit checks at each call site to ensure fault tolerance.

How does error aggregation improve diagnostics in distributed systems?

Error aggregation collects and groups multiple errors from distributed services into unified reports. This improves diagnostics by providing a holistic view of concurrent failures rather than isolated, disconnected error logs.

When should I apply graceful degradation instead of failing hard during runtime?

Apply graceful degradation when maintaining partial application functionality during component failure is preferable to total shutdown. This pattern sustains core operations by disabling non-essential features, ensuring user-facing resilience.

Does this error handling guidance cover both Python and TypeScript fault tolerance patterns?

Yes, this guidance covers fault tolerance patterns across Python and TypeScript, alongside Rust and Go. It details language-specific exception handling, error propagation, and universal resilience patterns for comprehensive application reliability.