wshobson avatar

Error Handling Patterns

The error-handling-patterns skill teaches developers how to implement robust error handling across multiple programming languages using techniques like exceptions, Result types, error propagation, and graceful degradation. It serves developers building resilient applications who need guidance on choosing appropriate error handling strategies, designing fault-tolerant systems, and improving debugging experiences. The skill solves the problem of inconsistent or inadequate error handling by providing language-specific patterns and clear guidance on when to use exceptions versus Result types, how to categorize errors as recoverable or unrecoverable, and how to implement advanced patterns like retry and circuit breaker mechanisms.

skills.sh installs
23.6K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill error-handling-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Error Handling Patterns

Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences.

When to Use This Skill

  • Implementing error handling in new features
  • Designing error-resilient APIs
  • Debugging production issues
  • Improving application reliability
  • Creating better error messages for users and developers
  • Implementing retry and circuit breaker patterns
  • Handling async/concurrent errors
  • Building fault-tolerant distributed systems

Core Concepts

1. Error Handling Philosophies

Exceptions vs Result Types:

  • Exceptions: Traditional try-catch, disrupts control flow
  • Result Types: Explicit success/failure, functional approach
  • Error Codes: C-style, requires discipline
  • Option/Maybe Types: For nullable values

When to Use Each:

  • Exceptions: Unexpected errors, exceptional conditions
  • Result Types: Expected errors, validation failures
  • Panics/Crashes: Unrecoverable errors, programming bugs

2. Error Categories

Recoverable Errors:

  • Network timeouts
  • Missing files
  • Invalid user input
  • API rate limits

Unrecoverable Errors:

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
DevOps & CI/CD, Debugging

More from wshobson/agents

All 174
1expo avatareas-hostingexpo/skillsEAS service (paid). Deploy Expo websites and Expo Router API routes to EAS Hosting - export the web bundle, run eas deploy for production and PR preview URLs, m22.1Kskills.sh installs
2tavily-ai avatartavily-best-practicestavily-ai/skillsBuild production-ready Tavily integrations with best practices baked in. Reference documentation for developers using coding assistants (Claude Code, Cursor, et21.5Kskills.sh installs
3antfu avatarvueuse-functionsantfu/skillsApply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features.21.4Kskills.sh installs
4wshobson avatarauth-implementation-patternswshobson/agentsMaster authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when 20.9Kskills.sh installs
5warpdotdev avatarsagawarpdotdev/common-skillsRun an autonomous, spec-driven development "saga" for medium-to-large features using an orchestrator agent and a fleet of worker subagents. Use this skill whene20.8Kskills.sh installs
6vercel avatarai-elementsvercel/ai-elementsBuild AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chat20.8Kskills.sh installs