error-handling-patterns

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

1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/knopki/dotfiles --skill error-handling-patterns-knopki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/knopki/dotfiles/tree/main/home/private_dot_config/opencode/skills/error-handling-patterns
Command: npx skills add https://github.com/knopki/dotfiles --skill error-handling-patterns-knopki

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers implement robust error handling strategies across various programming languages, leading to more reliable and maintainable applications.

Core Features & Use Cases

  • Cross-Language Patterns: Demonstrates best practices for exceptions, Result types, error propagation, and graceful degradation in Python, TypeScript/JavaScript, Rust, and Go.
  • Universal Patterns: Explains and provides examples for common patterns like Circuit Breaker, Error Aggregation, and Graceful Degradation.
  • Best Practices & Pitfalls: Offers guidance on effective error handling and common mistakes to avoid.
  • Use Case: When developing a new microservice, use this Skill to ensure consistent and effective error handling across all API endpoints, making debugging and maintenance easier.

Quick Start

Implement a custom exception hierarchy in Python for your application.

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 implement error handling patterns for a microservice API?

The best way to implement error handling for microservices is applying universal resilience patterns like Circuit Breaker and Graceful Degradation. This ensures consistent error propagation and robust API design across endpoints.

How do I implement a Result type for error propagation in TypeScript or Rust?

You can implement Result types for error propagation by following language-specific code examples for TypeScript, Rust, Python, and Go. This pattern provides safe error handling without relying solely on exceptions.

When do I need a Circuit Breaker pattern for fault tolerance?

You need a Circuit Breaker pattern for fault tolerance when building resilient applications that interact with unreliable external services. It prevents cascading failures by stopping requests when a service endpoint continuously fails.

Does this error handling guidance work for both Python and Go?

Yes, this error handling guidance works for Python and Go, alongside TypeScript and Rust. It provides cross-language best practices covering exceptions, Result types, and graceful degradation specific to each environment.

What are common error handling pitfalls and limitations when designing robust APIs?

Common error handling pitfalls include inconsistent error propagation and improper exception hierarchies. This guidance details these limitations and offers best practices to avoid them when designing robust APIs.