← ClaudeAtlas

error-handlinglisted

Consistent error handling across React frontend and Python backend. TRIGGER when: implementing error boundaries, exception handlers, or try/catch blocks. SKIP: shaping HTTP error response bodies (use api-design); logging the error (use logging-standards).
komluk/scaffolding · ★ 1 · Web & Frontend · score 74
Install: claude install-skill komluk/scaffolding
# Error Handling Skill ## Purpose Standards for consistent error handling across frontend and Python backend. ## Auto-Invoke Triggers - Implementing exception handling - Creating custom exceptions - Handling API errors - Implementing retry logic - Designing user-facing error messages --- ## Error Categories | Category | HTTP Code | User Action | Log Level | |----------|-----------|-------------|-----------| | Validation | 400 | Show field errors | WARN | | Authentication | 401 | Redirect to login | WARN | | Authorization | 403 | Show permission denied | WARN | | NotFound | 404 | Show not found message | INFO | | Conflict | 409 | Show conflict details | WARN | | RateLimit | 429 | Show retry-after | WARN | | ExternalService | 502 | Show fallback/retry option | ERROR | | Internal | 500 | Show generic error | ERROR | | Critical | 500 | Show maintenance page | CRITICAL | --- ## Exception Hierarchy Design ### Principles - Create base `AppException` class for all application errors - Extend with specific exception types per category - Include: code, message, status code, details (optional) - Never expose internal details to clients ### Required Exception Types 1. `ValidationException` - Invalid input data 2. `AuthenticationException` - Auth token invalid/expired 3. `AuthorizationException` - User lacks permission 4. `NotFoundException` - Resource doesn't exist 5. `ConflictException` - Resource state conflict 6. `RateLimitException` - Too many requests 7. `ExternalServiceExc