Added temporary logs

This commit is contained in:
asadazam93
2020-04-06 17:12:31 +05:00
parent 7eafc24212
commit 2ad8281343

View File

@@ -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):