Skip to content

Inconsistent Use of Custom Exceptions #4

@YanCotta

Description

@YanCotta

Description: The src/climate_risk/interfaces/api/exceptions.py file defines several custom exception classes, but they are not consistently used throughout the application. For example, the LocationService raises a generic ServiceError when a location is not found, instead of the more specific NotFoundError.

Tasks:

Review the application services and replace generic ServiceError exceptions with the more specific custom exceptions where appropriate.

Ensure that the API exception handlers in app.py correctly handle these custom exceptions.

Relevant Files:

src/climate_risk/interfaces/api/exceptions.py

src/climate_risk/application/services/location_service.py

src/climate_risk/application/services/weather_service.py

src/climate_risk/application/services/risk_service.py

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