aboutsummaryrefslogtreecommitdiff
path: root/gn3/llms/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/llms/errors.py')
-rw-r--r--gn3/llms/errors.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py
index 006e034..e9f7c02 100644
--- a/gn3/llms/errors.py
+++ b/gn3/llms/errors.py
@@ -4,6 +4,7 @@ import json
from requests import HTTPError
+
class UnprocessableEntity(HTTPError):
"""An HTTP 422 Unprocessable Entity error occurred.
@@ -51,7 +52,11 @@ class UnprocessableEntity(HTTPError):
error = f"{rq_field} {error}"
msg = json.dumps(errors)
- super(HTTPError, self).__init__(msg, request=request, response=response)
+ super(HTTPError, self).__init__(
+ msg, request=request, response=response)
- \ No newline at end of file
+class LLMError(HTTPError):
+ def __init__(self, request, response, msg):
+ super(HTTPError, self).__init__(
+ msg, request=request, response=response)