aboutsummaryrefslogtreecommitdiff
path: root/gn3/auth/authorisation/errors.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-02-08 17:24:35 +0300
committerFrederick Muriuki Muriithi2023-02-08 17:44:50 +0300
commit9b94ec57c504acb6ef815d134144c4c357c71f17 (patch)
tree3bf1647953956e6abada8344fabeb87ef526e731 /gn3/auth/authorisation/errors.py
parent87586bd5270140bf52d39d3dc61c754dd13d4391 (diff)
downloadgenenetwork3-9b94ec57c504acb6ef815d134144c4c357c71f17.tar.gz
auth: groups: handle join requests.
Diffstat (limited to 'gn3/auth/authorisation/errors.py')
-rw-r--r--gn3/auth/authorisation/errors.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gn3/auth/authorisation/errors.py b/gn3/auth/authorisation/errors.py
index e1fb1a0..99ee55d 100644
--- a/gn3/auth/authorisation/errors.py
+++ b/gn3/auth/authorisation/errors.py
@@ -6,7 +6,7 @@ class AuthorisationError(Exception):
All exceptions in this package should inherit from this class.
"""
- error_code: int = 500
+ error_code: int = 400
class UserRegistrationError(AuthorisationError):
"""Raised whenever a user registration fails"""
@@ -14,3 +14,9 @@ class UserRegistrationError(AuthorisationError):
class NotFoundError(AuthorisationError):
"""Raised whenever we try fetching (a/an) object(s) that do(es) not exist."""
error_code: int = 404
+
+class InconsistencyError(AuthorisationError):
+ """
+ Exception raised due to data inconsistencies
+ """
+ error_code: int = 500