about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-16 13:05:46 +0300
committerAlexander_Kabui2024-05-16 13:05:46 +0300
commit852f5c65cdf78c92012afcf9790d272b4e3f4419 (patch)
treeb1c60ff5f9b9157e356f955951d790c57cd80234
parentf6acfd3d6024ad36ef82a8e27918b03f6538cccc (diff)
downloadgenenetwork3-852f5c65cdf78c92012afcf9790d272b4e3f4419.tar.gz
Pep8 Cleanup for llms/errors file
-rw-r--r--gn3/llms/errors.py26
1 files changed, 3 insertions, 23 deletions
diff --git a/gn3/llms/errors.py b/gn3/llms/errors.py
index e9f7c02..af3d7b0 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):
@@ -57,6 +36,7 @@ class UnprocessableEntity(HTTPError):
 
 
 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)