diff options
author | Frederick Muriuki Muriithi | 2023-03-02 12:53:41 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-03-02 12:54:32 +0300 |
commit | 8f5f0c692293b96c2ec48a810196556764101ccc (patch) | |
tree | a383c3a3f00bfb89650becaf00f21fb373dec02b /gn3/auth/authorisation/errors.py | |
parent | 32c144cdf41d2f109901d34930296f34fa51323e (diff) | |
download | genenetwork3-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.py | 10 |
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. + """ |