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
class APIException:
status_code: int
user_message: str
Then existing custom exceptions can override these (along with the usual message specified in the constructor). Then a custom exception handler can be used to catch all such exceptions and log/return their status code and user message (without any IDs), effectively recreating sections like
We could have a base exception e.g.
Then existing custom exceptions can override these (along with the usual message specified in the constructor). Then a custom exception handler can be used to catch all such exceptions and log/return their status code and user message (without any IDs), effectively recreating sections like
inventory-management-system-api/inventory_management_system_api/routers/v1/catalogue_category.py
Lines 135 to 138 in 3a1d6cb
But just by relying on
raise LeafCategoryError
, in this case the whole try/catch could be removed.The text was updated successfully, but these errors were encountered: