fastapi-exceptions
CommunityStandardize FastAPI errors with custom exceptions
Software Engineering#fastapi#validation#exceptions#error-handling#centralized-handlers#error-schemas
Authoragusmdev
Version1.0.0
Installs0
System Documentation
What problem does it solve?
FastAPI projects often suffer from inconsistent error responses. This skill provides a unified exception hierarchy, standardized error payloads, and centralized handlers to deliver predictable, debuggable API errors.
Core Features & Use Cases
- Custom exception base (AppException) and built-in errors (NotFoundError, ConflictError, ValidationError, ForbiddenError, UnauthorizedError, BadRequestError, DatabaseError, ServiceUnavailableError) for common API failures.
- Standardized error schemas (ErrorResponse and ValidationErrorResponse) to unify error payloads across services.
- Centralized exception registration (register_exception_handlers) to automatically translate exceptions into consistent HTTP responses.
- Works with FastAPI endpoints, repositories, and services to improve maintainability and observability.
Quick Start
Create a NotFoundError in your service and raise it to return a 404 with a consistent payload, then wire up register_exception_handlers(app) in your FastAPI factory.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: fastapi-exceptions Download link: https://github.com/agusmdev/burntop/archive/main.zip#fastapi-exceptions Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.