You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
azure_storage
model_inference
inference.py
model_module.py
model_request
app.py
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
No more generic exceptions are caught or raised unless it is required (avoid server crash for example)
When errors are caught in a module, the custom exception is raised with the from keyword when necessary
Tasks
Modify the azure_storage module to eliminate every return False from catching exception; raise a custom exception instead
Modify the model_inference module to catch specific exceptions and return the ProcessInferenceResultError custom error
Raise a custom exception in model_request if the deployment platform of a model is not supported
Modify app.py to handle exceptions raised by the module it is using
The text was updated successfully, but these errors were encountered:
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 typeException
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
from
keyword when necessaryTasks
False
from catching exception; raise a custom exception insteadProcessInferenceResultError
custom errorThe text was updated successfully, but these errors were encountered: