From 2ad8281343323a441c9c2d3e9aa4efa666712f8b Mon Sep 17 00:00:00 2001 From: asadazam93 Date: Mon, 6 Apr 2020 17:12:31 +0500 Subject: [PATCH] Added temporary logs --- openedx/core/djangoapps/user_api/accounts/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index 99d06d0dcc..65c26a78f3 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -460,12 +460,15 @@ class DeactivateLogoutView(APIView): logout(request) return Response(status=status.HTTP_204_NO_CONTENT) except KeyError: + log.exception('Username not specified {}'.format(request.user)) return Response(u'Username not specified.', status=status.HTTP_404_NOT_FOUND) except user_model.DoesNotExist: + log.exception('The user "{}" does not exist.'.format(request.user.username)) return Response( u'The user "{}" does not exist.'.format(request.user.username), status=status.HTTP_404_NOT_FOUND ) except Exception as exc: # pylint: disable=broad-except + log.exception('500 error deactivating account {}'.format(exc)) return Response(text_type(exc), status=status.HTTP_500_INTERNAL_SERVER_ERROR) def _verify_user_password(self, request):