about summary refs log tree commit diff
path: root/gn3/errors.py
diff options
context:
space:
mode:
authorJohn Nduli2024-10-18 15:06:35 +0300
committerFrederick Muriuki Muriithi2024-10-18 09:28:40 -0500
commit27531c0a1350097ca36a555b8546bc282948de04 (patch)
treeb209f28f6da28fc0384ddfe1145cfe413f2bf8e3 /gn3/errors.py
parent1aeb61f50567e2400c3cc1a18eeef1e59bdc68ac (diff)
downloadgenenetwork3-27531c0a1350097ca36a555b8546bc282948de04.tar.gz
refactor: move definition of auth errs and remove auth cli utils
Diffstat (limited to 'gn3/errors.py')
-rw-r--r--gn3/errors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/errors.py b/gn3/errors.py
index cd795e8..46483db 100644
--- a/gn3/errors.py
+++ b/gn3/errors.py
@@ -16,7 +16,7 @@ from authlib.oauth2.rfc6749.errors import OAuth2Error
 from flask import Flask, jsonify, Response, current_app
 
 from gn3.oauth2 import errors as oautherrors
-from gn3.auth.authorisation.errors import AuthorisationError
+from gn3.oauth2.errors import AuthorisationError
 from  gn3.llms.errors import LLMError
 
 def add_trace(exc: Exception, jsonmsg: dict) -> dict:
@@ -60,7 +60,7 @@ def handle_authorisation_error(exc: AuthorisationError):
     return jsonify(add_trace(exc, {
         "error": type(exc).__name__,
         "error_description": " :: ".join(exc.args)
-    })), exc.error_code
+    })), 500
 
 
 def handle_oauth2_errors(exc: OAuth2Error):