diff --git a/coc/http.py b/coc/http.py index 4cfc4b44..3bc06e8f 100644 --- a/coc/http.py +++ b/coc/http.py @@ -353,6 +353,9 @@ async def request(self, route, **kwargs): await asyncio.sleep(tries * 2 + 1) continue + # catch any stray status codes + raise HTTPException(response, data) + except asyncio.TimeoutError: # api timed out, retry again if tries > 3: @@ -360,7 +363,6 @@ async def request(self, route, **kwargs): await asyncio.sleep(tries * 2 + 1) continue - raise else: if response.status in (500, 502, 504):