From d9f52891dc6bd9d264ba439385db60e5d95cf898 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Mon, 26 Aug 2019 10:53:22 +0300 Subject: [PATCH] fixed auth exceptions --- apps/utils/exceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/utils/exceptions.py b/apps/utils/exceptions.py index 4381204b..9d384030 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_404_NOT_FOUND + status_code = status.HTTP_400_BAD_REQUEST default_detail = _('User not found') @@ -94,5 +94,5 @@ class EmailConfirmedError(exceptions.APIException): class WrongAuthCredentials(exceptions.APIException): """The exception should be raised when credentials is not valid for this user """ - status_code = status.HTTP_400_BAD_REQUEST + status_code = status.HTTP_401_UNAUTHORIZED default_detail = _('Wrong authorization credentials')