diff options
| author | Frederick Muriuki Muriithi | 2023-01-28 03:13:28 +0300 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2023-01-28 03:20:01 +0300 |
| commit | e6e173b74d381f590ff5a8e7957489ea4d50c06b (patch) | |
| tree | 0f411a2b8d201a50bcdaf9684d37010bd047c3ef /gn3/auth/authorisation | |
| parent | 9f8de83700a5aa1c19ec8d11b0978e8852b442db (diff) | |
| download | genenetwork3-e6e173b74d381f590ff5a8e7957489ea4d50c06b.tar.gz | |
auth: Store error_code in Exception for flexibility
To allow for different error codes for the various exceptions, store the error_code in the exception objects and retrieve it from there when generating the response.
Diffstat (limited to 'gn3/auth/authorisation')
| -rw-r--r-- | gn3/auth/authorisation/errors.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gn3/auth/authorisation/errors.py b/gn3/auth/authorisation/errors.py index fa2d6b7..89c5983 100644 --- a/gn3/auth/authorisation/errors.py +++ b/gn3/auth/authorisation/errors.py @@ -6,6 +6,7 @@ class AuthorisationError(Exception): All exceptions in this package should inherit from this class. """ + error_code: int = 500 class UserRegistrationError(AuthorisationError): """Raised whenever a user registration fails""" |
