Skip to content

Commit

Permalink
refactor: logged error and returned appropriate message
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahwaheed committed Nov 25, 2024
1 parent 6f6f6aa commit 5b7c749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commerce_coordinator/apps/frontend_app_ecommerce/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@ def get(self, request):

return Response(output)
except Exception as exc: # pylint: disable=broad-except
return Response(status=HTTP_400_BAD_REQUEST, data=str(exc))
logger.error(f'UserOrdersView threw following exception: [{exc}]')
return Response(status=HTTP_400_BAD_REQUEST, data='Something went wrong!')

Check failure on line 116 in commerce_coordinator/apps/frontend_app_ecommerce/views.py

View workflow job for this annotation

GitHub Actions / tests (ubuntu-20.04, 3.8, django42)

Missing coverage

Missing coverage on lines 114-116

0 comments on commit 5b7c749

Please sign in to comment.