Skillquality 0.45
litestar-exceptions
Auto-activate for exception_handlers, HTTPException, ApplicationError, NotFoundError, ConflictError, ValidationException, PermissionDeniedException, RFC 7807 responses, or domain-to-HTTP error mapping. Use when designing Litestar exception hierarchies, handlers, or error response
Price
free
Protocol
skill
Verified
no
What it does
Litestar Exceptions
Use this skill for domain exception hierarchies, handler registration, and HTTP error response shape.
Code Style Rules
- Centralize domain-to-HTTP translation in exception handlers.
- Keep route handlers free of repetitive try/except blocks.
- Use domain exception classes when services need stable error contracts.
- Keep validation errors aligned with DTO and OpenAPI behavior.
Quick Reference
- Exception patterns: exceptions.md
- Pair with litestar-auth-guards for permission failures.
- Pair with litestar-data-services for not-found and conflict behavior.
Workflow
- Define a small domain exception hierarchy.
- Register handlers at app config.
- Raise domain exceptions from services or Litestar exceptions from framework boundaries.
- Test response status and payload shape.
Guardrails
- Do not catch exceptions in every handler.
- Do not leak database exception messages to API clients.
- Do not return inconsistent error payloads from neighboring routes.
- Do not replace Litestar validation behavior without a clear API reason.
Validation Checkpoint
- Exceptions have stable status mapping.
- App-level handlers are registered.
- Services do not return sentinel error values.
- Tests cover representative failure responses.
Example
class ApplicationError(HTTPException):
status_code = 500
class ConflictError(ApplicationError):
status_code = 409
</example>
References Index
Official References
- https://docs.litestar.dev/ - Litestar documentation
- https://docs.litestar.dev/latest/reference/ - Litestar API reference
Shared Styleguide Baseline
Capabilities
skillsource-litestar-orgskill-litestar-exceptionstopic-advanced-alchemytopic-agent-skillstopic-agentskillstopic-ai-agentstopic-claude-code-plugintopic-claude-code-skillstopic-gemini-cli-extensiontopic-htmxtopic-inertiatopic-litestartopic-mcptopic-python
Install
Installnpx skills add litestar-org/litestar-skills
Transportskills-sh
Protocolskill
Quality
0.45/ 1.00
deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (2,086 chars)
Provenance
Indexed fromgithub
Enriched2026-05-18 19:13:53Z · deterministic:skill-github:v1 · v1
First seen2026-05-18
Last seen2026-05-18