Treat ClientPayloadError as a failed request
This commit is contained in:
1 parent
a42a72bfb1
commit
86f339f4f6
1 file changed
+6
-3
@@ -1293,12 +1293,15 @@ class Twitch:
|
|||||||
yield response
|
yield response
|
||||||
return
|
return
|
||||||
self.print(_("error", "site_down").format(seconds=round(delay)))
|
self.print(_("error", "site_down").format(seconds=round(delay)))
|
||||||
except aiohttp.ClientConnectorCertificateError: # type: ignore[unused-ignore]
|
except aiohttp.ClientConnectorCertificateError:
|
||||||
# for a case where SSL verification fails
|
# for a case where SSL verification fails
|
||||||
raise
|
raise
|
||||||
except (aiohttp.ClientConnectionError, asyncio.TimeoutError):
|
except (
|
||||||
# just so that quick retries that often happen, aren't shown
|
aiohttp.ClientConnectionError, asyncio.TimeoutError, aiohttp.ClientPayloadError
|
||||||
|
):
|
||||||
|
# connection problems, retry
|
||||||
if backoff.steps > 1:
|
if backoff.steps > 1:
|
||||||
|
# just so that quick retries that sometimes happen, aren't shown
|
||||||
self.print(_("error", "no_connection").format(seconds=round(delay)))
|
self.print(_("error", "no_connection").format(seconds=round(delay)))
|
||||||
finally:
|
finally:
|
||||||
if response is not None:
|
if response is not None:
|
||||||
|
|||||||
Reference in new issue
Block a user