diff options
author | Alexander Kabui | 2024-09-06 11:17:18 +0300 |
---|---|---|
committer | GitHub | 2024-09-06 11:17:18 +0300 |
commit | cfeb54b776e95194381d26cff02ea738ad4fd3e0 (patch) | |
tree | 1a7cf011bbeb61df90963d79237643bc9f8611f5 /gn3/llms/errors.py | |
parent | 8e28770342b65cff78441670f1841e0130dc9c4b (diff) | |
parent | 8cb85c8f8c12180702cfc3a257bf9a513ac4da3d (diff) | |
download | genenetwork3-cfeb54b776e95194381d26cff02ea738ad4fd3e0.tar.gz |
Merge pull request #188 from genenetwork/chores/merge-gnqa-api
Chores/merge gnqa api
Diffstat (limited to 'gn3/llms/errors.py')
-rw-r--r-- | gn3/llms/errors.py | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py index e9f7c02..a3a47a3 100644 --- a/gn3/llms/errors.py +++ b/gn3/llms/errors.py @@ -1,32 +1,11 @@ - -# pylint: skip-file +""" Error handlers for Fahamu Api""" import json - from requests import HTTPError class UnprocessableEntity(HTTPError): - """An HTTP 422 Unprocessable Entity error occurred. - + """Error for HTTP 422 Unprocessable Entity https://help.helpjuice.com/en_US/api-v3/api-v3#errors - - The request could not be processed, usually due to a missing or invalid parameter. - - The response will also include an error object with an explanation of fields that - are missing or invalid. Here is an example: - - .. code-block:: - - HTTP/1.1 422 Unprocessable Entity - - - { - "errors": [ - { - "email": "is not valid." - } - ] - } """ def __init__(self, request, response): @@ -56,7 +35,5 @@ class UnprocessableEntity(HTTPError): msg, request=request, response=response) -class LLMError(HTTPError): - def __init__(self, request, response, msg): - super(HTTPError, self).__init__( - msg, request=request, response=response) +class LLMError(Exception): + """custom exception for LLMErrorMIxins""" |