error-handling-patterns

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

1|1|Updated Dec 15, 2024
One-click install
npx skills add https://github.com/Alejocabeza/dotfiles --skill error-handling-patterns-alejocabeza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling-patterns
Source: https://github.com/Alejocabeza/dotfiles/tree/main/opencode/skills/error-handling-patterns
Command: npx skills add https://github.com/Alejocabeza/dotfiles --skill error-handling-patterns-alejocabeza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage cross-language error handling by standardizing patterns across exceptions, Result types, error propagation, and graceful degradation to improve reliability and debuggability.

Core Features & Use Cases

  • Cross-language patterns covering exceptions vs Result types, error codes, and option/maybe styles to guide consistent handling.
  • Actionable templates and examples for Python, TypeScript, Rust, and Go, enabling quick adoption in APIs and services.
  • Robust best practices including fail-fast validation, meaningful error messages, and structured recovery strategies for distributed systems.

Quick Start

Define a project-wide error-handling policy based on the patterns described and implement example templates in your codebase.

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 standardize error handling across Python, TypeScript, Rust, and Go?

Cross-language error handling can be standardized by applying consistent patterns like exceptions and Result types. This approach improves reliability and debuggability across Python, TypeScript, Rust, and Go by providing structured recovery strategies.

How do I implement Result types and error propagation for robust APIs?

You can implement Result types and error propagation by applying concrete templates and code examples. This enables quick adoption of fail-fast validation and structured recovery strategies for robust APIs.

When should I use exceptions vs Result types for error handling?

Choose exceptions vs Result types based on your language paradigm and project policy. Cross-language patterns guide consistent handling by covering error codes and option/maybe styles to ensure proper propagation and graceful degradation.

How do I handle errors in distributed systems without losing reliability?

Maintain reliability in distributed systems by implementing robust best practices including fail-fast validation and meaningful error messages. Structured recovery strategies and graceful degradation patterns ensure errors are handled without losing system stability.

Does this approach provide concrete code templates for graceful degradation?

Yes, this approach provides concrete templates and code examples for graceful degradation. These examples cover common scenarios and recovery strategies across Python, TypeScript, Rust, and Go, enabling quick adoption in your codebase.