From 5b7c74925fdc043961ba84c08eb9f369581523c0 Mon Sep 17 00:00:00 2001 From: Muhammad Abdullah Waheed Date: Mon, 25 Nov 2024 13:15:15 +0500 Subject: [PATCH] refactor: logged error and returned appropriate message --- commerce_coordinator/apps/frontend_app_ecommerce/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commerce_coordinator/apps/frontend_app_ecommerce/views.py b/commerce_coordinator/apps/frontend_app_ecommerce/views.py index 86dd5512..3ff1a7bf 100644 --- a/commerce_coordinator/apps/frontend_app_ecommerce/views.py +++ b/commerce_coordinator/apps/frontend_app_ecommerce/views.py @@ -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!')