error-handling-patterns

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

8|5|Updated Feb 21, 2025
One-click install
npx skills add https://github.com/YamilAyma/enlaces-para-desarrolladores --skill error-handling-patterns-yamilayma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/YamilAyma/enlaces-para-desarrolladores/tree/main/.agent/skills/error-handling-patterns
Command: npx skills add https://github.com/YamilAyma/enlaces-para-desarrolladores --skill error-handling-patterns-yamilayma

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance on error handling patterns, equipping developers with the knowledge to create more reliable and fault-tolerant applications.

Core Features & Use Cases

  • Error Handling Philosophies: Understand the differences between exceptions, result types, error codes, and option types.
  • Error Categories: Learn to categorize recoverable and unrecoverable errors effectively.
  • Language-Specific Patterns: Explore specific error handling techniques in Python, TypeScript/JavaScript, Rust, and Go.
  • Universal Patterns: Implement circuit breakers, error aggregation, and graceful degradation to enhance system reliability.
  • Best Practices: Follow best practices for error handling, including fail fast, preserve context, and meaningful messages.
  • Common Pitfalls: Avoid common mistakes in error handling, such as catching too broadly and not cleaning up resources.

Quick Start

Use the error-handling-patterns skill to improve error handling in your application by reviewing the language-specific patterns and best practices provided.

Frequently Asked Questions about error-handling-patterns

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

FAQPage Schema
What is the best way to handle errors across different programming languages?

Error handling philosophies differ by language: Python and TypeScript use exceptions, while Rust and Go leverage result types and error codes to explicitly manage recoverable and unrecoverable application failures.

How do I implement resilient error handling strategies in my application?

You can implement resilient error handling by applying universal patterns such as circuit breakers, error aggregation, and graceful degradation to enhance overall system reliability.

How do I distinguish between recoverable and unrecoverable errors in my code?

Distinguish recoverable from unrecoverable errors by categorizing them based on whether the application can safely continue execution or must halt, using language-specific patterns to manage each category effectively.

What are common error handling pitfalls I should avoid when building fault-tolerant applications?

Common error handling pitfalls to avoid include catching exceptions too broadly, failing to clean up resources properly, and losing error context, which undermines application fault tolerance and makes debugging difficult.

Does this error handling guide include specific examples for Python, TypeScript, Rust, and Go?

Yes, this guide provides language-specific error handling examples and best practices for Python, TypeScript/JavaScript, Rust, and Go to help you implement robust strategies effectively across different environments.