error-handling-patterns

Define cross-language error handling patterns with exceptions and Result types.

3|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill error-handling-patterns-duanbiao2000
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/duanbiao2000/obsidianDoc26/tree/main/agents-main/plugins/developer-essentials/skills/error-handling-patterns
Command: npx skills add https://github.com/duanbiao2000/obsidianDoc26 --skill error-handling-patterns-duanbiao2000

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Error handling is often inconsistent across languages and modules, leading to unclear failures, duplicated logic, and unreliable systems.

Core Features & Use Cases

  • Cross-language patterns for errors (exceptions, Result types, error codes, and option types) with concrete language examples.
  • Practical guidance for API design, input validation, retries, logging, and graceful degradation in distributed systems.
  • Real-world scenarios including service failures, cascading errors, and debugging workflows to improve reliability.

Quick Start

Refactor a sample operation to use explicit error types or result wrappers across all modules.

Frequently Asked Questions about error-handling-patterns

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

FAQPage Schema
How do I handle error propagation across different languages in a microservices architecture?

Error propagation across languages requires a universal taxonomy and language-appropriate implementations like exceptions or Result types. This unifies failures in microservices by defining explicit error codes, recovery strategies, and logging practices to prevent cascading errors.

What is the best way to design APIs for graceful degradation and retries in distributed systems?

API design for graceful degradation in distributed systems involves implementing explicit error types, structured logging, and retry patterns with backoff. This ensures services handle failures gracefully, maintain reliability during partial outages, and provide clear debugging workflows for cascading errors.

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

Result types are used instead of exceptions when you need explicit, compiler-verified error handling in your data processing pipelines. They force the caller to acknowledge potential failures, making error paths clear and preventing unhandled exceptions in critical workflows.

How do I implement consistent input validation and error handling patterns across modules?

Consistent input validation across modules is implemented by refactoring operations to use explicit error types or result wrappers. This approach standardizes validation failures, eliminates duplicated logic, and ensures that errors are propagated uniformly throughout the system.

Does this approach provide concrete code examples for cross-language exception handling?

Yes, the approach provides concrete code examples and references for cross-language exception handling. It includes language-appropriate implementations and best-practice guidelines to help you unify error handling logic and build robust recovery strategies across different programming environments.

Why does inconsistent error handling lead to unreliable systems and how can I fix it?

Inconsistent error handling leads to unreliable systems because unclear failures cause duplicated logic and unhandled cascading errors. You can fix this by adopting a universal error taxonomy and standardizing error propagation with result wrappers across all modules.