exception-handling

Installation
SKILL.md

Exception Handling

Use this skill when defining API error contracts and mapping domain failures to HTTP responses.

Workflow

  1. Define domain exceptions for expected failure classes.
  2. Map exceptions to Litestar handlers globally or by scope.
  3. Return consistent error payload shapes.
  4. Log with enough context for debugging without leaking sensitive details.

Pattern

from litestar import Litestar, Request
from litestar.response import Response


class DomainError(Exception):
Related skills

More from alti3/litestar-skills

Installs
2
GitHub Stars
5
First Seen
Mar 2, 2026