diff options
| author | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-05-28 12:16:45 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-05-28 12:16:45 -0500 |
| commit | 5d7eef9caf764c56f1e586a616c046d996c1a202 (patch) | |
| tree | 37df74d0882c0f3755c9ab35fd4f19a8cf80d33d /gn3/errors.py | |
| parent | bbb72d0d9da4d57ac8eff7751bcab24603d82a39 (diff) | |
| download | genenetwork3-5d7eef9caf764c56f1e586a616c046d996c1a202.tar.gz | |
Return 401 (Unauthorized) for AuthorisationError exceptions.
Diffstat (limited to 'gn3/errors.py')
| -rw-r--r-- | gn3/errors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/errors.py b/gn3/errors.py index e46ce24..f0d499e 100644 --- a/gn3/errors.py +++ b/gn3/errors.py @@ -73,7 +73,7 @@ def handle_authorisation_error(exc: AuthorisationError): return jsonify(add_trace(exc, { "error": type(exc).__name__, "error_description": " :: ".join(exc.args) - })), 500 + })), 401 def handle_oauth2_errors(exc: OAuth2Error): @@ -131,7 +131,7 @@ def handle_local_authorisation_errors(exc: oautherrors.AuthorisationError): return jsonify(add_trace(exc, { "error": type(exc).__name__, "error_description": " ".join(exc.args) - })), 400 + })), 401 def handle_llm_error(exc: Exception) -> Response: |
