litestar-exception-handling

Installation
SKILL.md

Exception Handling

Execution Workflow

  1. Separate startup and configuration failures from request-time failures.
  2. Decide whether the failure should be represented by raising HTTPException or by mapping another exception type through an exception handler.
  3. Choose the narrowest layer that should own the handler: app, router, controller, or route handler.
  4. Keep the outbound error contract stable: status code, payload shape, media type, and safe detail level.
  5. Register app-level handlers for 404 Not Found and 405 Method Not Allowed when those responses must be customized.
  6. Verify validation and server-failure paths separately so sensitive details do not leak unintentionally.

Core Rules

Installs
32
GitHub Stars
7
First Seen
Mar 2, 2026
litestar-exception-handling — alti3/litestar-skills