aboutsummaryrefslogtreecommitdiff
path: root/gn3/llms/errors.py
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-22 13:37:32 +0300
committerAlexander_Kabui2024-05-22 13:37:32 +0300
commit12100489a73094016602926183e0ee51002fb9c6 (patch)
tree7b8e4c56917b1fe02cf1c1da29aa8849dd9df79a /gn3/llms/errors.py
parent2a99da9f46233a28e9ea0b6a297d8a6b93f61923 (diff)
downloadgenenetwork3-12100489a73094016602926183e0ee51002fb9c6.tar.gz
Register LLM error in app.
* do refactoring for gn3:llm:errors
Diffstat (limited to 'gn3/llms/errors.py')
-rw-r--r--gn3/llms/errors.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py
index af3d7b0..3512f4d 100644
--- a/gn3/llms/errors.py
+++ b/gn3/llms/errors.py
@@ -35,8 +35,12 @@ class UnprocessableEntity(HTTPError):
msg, request=request, response=response)
-class LLMError(HTTPError):
- """Custom error from making Fahamu APi request """
- def __init__(self, request, response, msg):
- super(HTTPError, self).__init__(
- msg, request=request, response=response)
+class LLMErrorMIxins(Exception):
+ """base class for llm errors"""
+
+
+class LLMError(LLMErrorMIxins):
+ """custom exception for LLMErrorMIxins"""
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args)
+ self.query = kwargs.get("query")