Skip to content

Why a single app_exceptions.py? #9

@pycub

Description

@pycub

I assume it's nicer to have the ./exceptions/ directory and put each service exception module containing relevant error data.

And if you were to add a new service called Bar:

./routers/      bar.py # Router instance and routes
./services/     bar.py # Business logic (including CRUD helpers)
./schemas/      bar.py # Data "schemas" (e.g., Pydantic models)
./models/       bar.py # Database models (e.g., SQLAlchemy models)
./exceptions/   bar.py # Exceptoins classes completely decoupled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions