| name | Global Error Handling |
| description | Implement robust error handling with user-friendly messages, fail-fast validation, specific exception types, and graceful degradation strategies. Use this skill when writing error handling logic, exception handling code, input validation, or defensive programming patterns in any part of the application. Apply when working with try-catch blocks, error boundaries, exception handlers, API error responses, validation logic, or any code that needs to handle failure scenarios. Use when implementing user-facing error messages that don't expose technical details, validating input early with clear error messages, using specific exception types for targeted handling, centralizing error handling at application boundaries, or implementing retry strategies for transient failures. Apply when ensuring resources are properly cleaned up in error scenarios, designing graceful degradation for non-critical service failures, or implementing fail-fast patterns with explicit error messages. |
When to use this skill:
- When implementing error handling or exception handling in any code
- When working with try-catch blocks, error boundaries, or exception handlers
- When creating user-facing error messages for forms, APIs, or UI feedback
- When validating input and checking preconditions early in functions
- When using specific exception or error types instead of generic ones
- When implementing centralized error handling at API or application boundaries
- When designing graceful degradation for non-critical service failures
- When implementing retry strategies with exponential backoff for external services
- When ensuring resource cleanup in finally blocks or equivalent patterns
- When preventing technical details or stack traces from being exposed to users
- When implementing fail-fast validation patterns
Global Error Handling
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle global error handling.
Instructions
For details, refer to the information provided in this file: global error handling