diff options
Diffstat (limited to 'gn_auth/auth/errors.py')
| -rw-r--r-- | gn_auth/auth/errors.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gn_auth/auth/errors.py b/gn_auth/auth/errors.py index c499e86..832d1bd 100644 --- a/gn_auth/auth/errors.py +++ b/gn_auth/auth/errors.py @@ -14,6 +14,7 @@ class ForbiddenAccess(AuthorisationError): class UserRegistrationError(AuthorisationError): """Raised whenever a user registration fails""" + error_code: int = 400 class UserVerificationError(UserRegistrationError): """Raised when verification of a user fails.""" @@ -26,6 +27,7 @@ class InvalidData(AuthorisationError): """ Exception if user requests invalid data """ + error_code: int = 400 class InconsistencyError(AuthorisationError): """ @@ -37,8 +39,10 @@ class PasswordError(AuthorisationError): """ Raise in case of an error with passwords. """ + error_code: int = 400 class UsernameError(AuthorisationError): """ Raise in case of an error with a user's name. """ + error_code: int = 400 |
