Agent skill · software engineering · aiskillstore

error-handling

Use when implementing structured error handling in backend or frontend code. Triggers for: try-catch patterns, custom exception classes, global error handlers, error logging, user-friendly error messages, or API error responses. NOT for: business logic validation (use domain exceptions) or unrelated error types.

Why this skill is useful

Provides specific patterns and custom exception classes for structured error handling in FastAPI and React/Next.js that the AI wouldn't reliably generate on its own.

What it needs

About 6k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Error Handling Skill Expert structured error handling for FastAPI backends and React/Next.js frontends with consistent error messages and logging. Quick Reference Pattern Backend Frontend --------- --------- ---------- Custom exception class FeeNotPaidError(AppException) N/A Try-catch try: ... except SpecificError: try { } catch (e) { } Global handler @app.exceptionhandler ErrorBoundary component User message detail field in response Toast/Snackbar Error logging logger.error(...) Console/Sentry Custom Exceptions (Backend) Base Exception Hierarchy Domain-Specific Exceptions Try-Catch Patterns Narrow Try Blocks Cleanup with Finally Error Logging (Backend) Structured JSON Logging Using the Logger Global Error Handler (Backend) Frontend Error Handling Error Types Error Mapper API Client with Error Handling React Query with Error Handling Quality Checklist [ ] No swallowed errors: Every exception is either logged or surfaced to user [ ] Internal vs user message separation: Technical details in detail, user-friendly in usermessage [ ] 4xx vs 5xx correctly mapped: Client errors (4xx) vs server errors (5xx) [ ] No PII in logs: Never log passwords, tokens, personal data [ ] Correlation IDs: Track errors across services with request IDs [ ] Consistent error format: Same structure for all API errors Error Response Format Integration Points Skill Integration ------- ------------- @fastapi-app Global exception handlers in main.py @api-route-design Proper status codes in responses @jwt-auth UnauthorizedError for auth failures @db-migration Handle migration errors gracefully @env-config Configuration validation errors

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/error-handling

View the source on GitHub

Browse the @skills marketplace