error-handling-patterns

Provide cross-language error-handling patterns for Python, TypeScript, Rust, and Go.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill error-handling-patterns-leonardoteodoroo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/leonardoteodoroo/amino-advanced/tree/main/.agent/skills/error-handling-patterns
Command: npx skills add https://github.com/leonardoteodoroo/amino-advanced --skill error-handling-patterns-leonardoteodoroo

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

Core Features & Use Cases

  • Error handling philosophies (exceptions vs result types vs error codes)
  • Error categories (recoverable vs unrecoverable)
  • Language-specific patterns (Python, TypeScript, Rust, Go)
  • Universal patterns (circuit breaker, error aggregation, graceful degradation)
  • Best practices and common pitfalls to avoid

Quick Start

Refactor a sample function to use explicit error types and propagate failures to a caller-friendly API.

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 Python, TypeScript, Rust, and Go?

Cross-language error handling patterns include exceptions, Result types, and error codes tailored to each language. This Skill provides categorized error classes, retry logic, and circuit breaker templates with runnable examples for Python, TypeScript, Rust, and Go to ensure robust application development.

How do I implement a circuit breaker pattern for API reliability?

Implementing a circuit breaker pattern stops cascading failures by tripping a breaker when downstream error rates spike. This Skill provides universal error handling templates, retry logic, and graceful degradation best practices to build robust APIs that recover from transient faults.

When should I use Result types instead of exceptions for error propagation?

Use Result types for explicit, type-safe error propagation in languages like Rust, whereas exceptions suit dynamic languages like Python. This Skill compares these error handling philosophies to help you distinguish recoverable from unrecoverable errors during API design and feature development.

How do I refactor a function to use explicit error types and propagate failures?

Refactoring a function to use explicit error types involves defining categorized error classes and returning structured failures to a caller-friendly API. This Skill provides cross-language templates with runnable examples to implement explicit error typing and proper error propagation.

What are common error handling pitfalls and how can I avoid them?

Common error handling pitfalls include swallowing exceptions, mixing recoverable and unrecoverable errors, and lacking retry logic. This Skill outlines best practices and anti-patterns across Python, TypeScript, Rust, and Go, offering templates to avoid these mistakes and improve application robustness.

Does this error handling approach work for both feature development and debugging sessions?

Yes, these cross-language error handling patterns apply directly to feature development, API design, debugging sessions, and reliability improvements. The templates support explicit error typing, categorized error classes, and graceful degradation across multiple languages to address diverse development scenarios.