diff options
author | 2022-06-30 19:26:04 +0100 | |
---|---|---|
committer | 2022-06-30 19:26:04 +0100 | |
commit | 6e4d9fce6b02ab14528ea239b4eb0821b6c87140 (patch) | |
tree | 5bdd92652f52dec50761eb206f9a38229c6c0c9b /botcore/site_api.py | |
parent | Merge pull request #95 from python-discord/dependabot/pip/urllib3-1.26.5 (diff) | |
parent | Merge branch 'main' into misc-bug-fixes (diff) |
Merge pull request #91 from python-discord/misc-bug-fixes
Diffstat (limited to 'botcore/site_api.py')
-rw-r--r-- | botcore/site_api.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/botcore/site_api.py b/botcore/site_api.py index dbdf4f3b..44309f9d 100644 --- a/botcore/site_api.py +++ b/botcore/site_api.py @@ -26,7 +26,7 @@ class ResponseCodeError(ValueError): Args: response (:obj:`aiohttp.ClientResponse`): The response object from the request. response_json: The JSON response returned from the request, if any. - request_text: The text of the request, if any. + response_text: The text of the request, if any. """ self.status = response.status self.response_json = response_json or {} @@ -76,7 +76,8 @@ class APIClient: """Close the aiohttp session.""" await self.session.close() - async def maybe_raise_for_status(self, response: aiohttp.ClientResponse, should_raise: bool) -> None: + @staticmethod + async def maybe_raise_for_status(response: aiohttp.ClientResponse, should_raise: bool) -> None: """ Raise :exc:`ResponseCodeError` for non-OK response if an exception should be raised. |