Skip to content

Commit

Permalink
fix UserDoesNotExistError
Browse files Browse the repository at this point in the history
  • Loading branch information
eugapx committed Dec 27, 2023
1 parent bb3bb84 commit b1a2e82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions df_auth/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.utils.translation import gettext_lazy as _
from rest_framework import status
from rest_framework.exceptions import (
AuthenticationFailed,
PermissionDenied,
ValidationError,
)
Expand Down Expand Up @@ -34,12 +35,11 @@ class UserAlreadyExistError(DfAuthValidationError):
default_code = "user_already_exists"


class UserDoesNotExistError(DfAuthValidationError):
class UserDoesNotExistError(AuthenticationFailed):
"""
This exception is used when user already exists
"""

status_code = status.HTTP_401_UNAUTHORIZED
default_detail = _("User with this identity does not exist, try signup instead")
default_code = "user_does_not_exist"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "django-df-auth"
version = "1.0.7"
version = "1.0.8"
description = "Opinionated Django REST auth endpoints for JWT authentication and social accounts."
readme = "README.md"
authors = [{name = "Apexive OSS", email = "open-source@apexive.com"}]
Expand Down

0 comments on commit b1a2e82

Please sign in to comment.