From de0a1d635884feab677835e035be2fad5aa0b514 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Wed, 28 Aug 2019 12:58:33 +0300 Subject: [PATCH] changed jwt login view (changed status code if user not found) --- apps/utils/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/utils/exceptions.py b/apps/utils/exceptions.py index 9d384030..16eb12fc 100644 --- a/apps/utils/exceptions.py +++ b/apps/utils/exceptions.py @@ -24,7 +24,7 @@ class ServiceError(ProjectBaseException): class UserNotFoundError(ProjectBaseException): """The exception should be thrown when the user cannot get""" - status_code = status.HTTP_400_BAD_REQUEST + status_code = status.HTTP_401_UNAUTHORIZED default_detail = _('User not found')