diff options
| author | 2020-05-07 01:52:44 +0200 | |
|---|---|---|
| committer | 2020-05-07 01:52:44 +0200 | |
| commit | d98a418f9cafc8ce907293cb833cabfd68c92fb3 (patch) | |
| tree | 5bfc8dcf93f8ab994f01beb27e8087facd84c53f | |
| parent | continue on internal server errors. (diff) | |
Log unexpected JSON responses.
| -rw-r--r-- | bot/utils/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/utils/__init__.py b/bot/utils/__init__.py index b273b2cde..ec7cbd214 100644 --- a/bot/utils/__init__.py +++ b/bot/utils/__init__.py @@ -56,3 +56,7 @@ async def send_to_paste_service(http_session: ClientSession, contents: str, *, e elif "key" in response_json: log.info(f"Successfully uploaded contents to paste service behind key {response_json['key']}.") return URLs.paste_service.format(key=response_json['key']) + extension + log.warning( + f"Got unexpected JSON response from paste service: {response_json}\n" + f"trying again ({attempt}/{FAILED_REQUEST_ATTEMPTS})." + ) |