ai-cfia / nachet-backend

A flask-based backend for Nachet to handle Azure endpoint and Azure storage API requests from the frontend.
MIT License
1 stars 3 forks source link

Refactor function from module in the backend to catch errors and raise custom exceptions #61

Closed MaxenceGui closed 2 months ago

MaxenceGui commented 4 months ago

Issue Description

At present, several backend functions are not optimally handling exceptions. Some of them return False when they catch an exception, while others use the generic type Exception to catch all possible errors, which is not a good practice as it can hide critical errors that the team needs to address. Additionally, some custom exceptions are being attempted to be caught but are never raised in the first place.

Concerned module:

Excluding pipelines_version_insertion.py as another issue is specific to this case

Work to do

Refactor the backend to handle exceptions as per Python standards and provide meaningful error messages.

Acceptance Criteria

Tasks