aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/errors.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-03-02 12:53:41 +0300
committerFrederick Muriuki Muriithi2023-03-02 12:54:32 +0300
commit8f5f0c692293b96c2ec48a810196556764101ccc (patch)
treea383c3a3f00bfb89650becaf00f21fb373dec02b /gn3/auth/authorisation/errors.py
parent32c144cdf41d2f109901d34930296f34fa51323e (diff)
downloadgenenetwork3-8f5f0c692293b96c2ec48a810196556764101ccc.tar.gz
auth: user registration: Rework error checking. Add email validation
Diffstat (limited to 'gn3/auth/authorisation/errors.py')
-rw-r--r--gn3/auth/authorisation/errors.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gn3/auth/authorisation/errors.py b/gn3/auth/authorisation/errors.py
index 2116ead..ff28cd4 100644
--- a/gn3/auth/authorisation/errors.py
+++ b/gn3/auth/authorisation/errors.py
@@ -26,3 +26,13 @@ class InconsistencyError(AuthorisationError):
Exception raised due to data inconsistencies
"""
error_code: int = 500
+
+class PasswordError(AuthorisationError):
+ """
+ Raise in case of an error with passwords.
+ """
+
+class UsernameError(AuthorisationError):
+ """
+ Raise in case of an error with a user's name.
+ """