error-handling

Solid

Implements error handling patterns, structured logging, retry strategies, circuit breakers, and graceful degradation. Use when designing error handling, setting up logging, implementing retries, adding error tracking, or when asked about error boundaries, log aggregation, alerting, or resilience patterns.

AI & Automation 1,367 stars 191 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Error Handling & Observability ### When to Load - **Trigger**: Try/catch patterns, retry logic, error responses, circuit breakers, structured logging - **Skip**: No error handling or observability involved in the current task ## Error Handling Workflow Copy this checklist and track progress: ``` Error Handling Progress: - [ ] Step 1: Define error taxonomy (categories and severity) - [ ] Step 2: Implement error handling by layer - [ ] Step 3: Set up structured logging - [ ] Step 4: Add retry and circuit breaker patterns - [ ] Step 5: Configure error tracking service - [ ] Step 6: Define user-facing error messages - [ ] Step 7: Validate against anti-patterns checklist ``` ## Error Handling Patterns by Language ### JavaScript / TypeScript ```typescript // Custom error hierarchy class AppError extends Error { constructor( message: string, public statusCode: number = 500, public code: string = "INTERNAL_ERROR", public isOperational: boolean = true, ) { super(message); this.name = this.constructor.name; } } class NotFoundError extends AppError { constructor(resource: string, id: string) { super(`${resource} with id ${id} not found`, 404, "NOT_FOUND"); } } class ValidationError extends AppError { constructor(public errors: Record<string, string[]>) { super("Validation failed", 400, "VALIDATION_ERROR"); } } // WRONG: Swallowing errors silently try { await saveUser(data); } catch (e) { // nothing here -- bug hides forever } ...

Details

Author
CloudAI-X
Repository
CloudAI-X/claude-workflow-v2
Created
5 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category