diff --git a/src/api/rate_limiter.py b/src/api/rate_limiter.py index 892250b..70a35f0 100644 --- a/src/api/rate_limiter.py +++ b/src/api/rate_limiter.py @@ -185,6 +185,14 @@ async def handle_requests(self): try: self.requests[request.key]["result"] = self.handle_get_request(request) + except RLRequestFailed as exc: + # Request failed and should not be sent again + self.requests[request.key]["result"] = None + # set the exception + self.requests[request.key]["exception"] = ( + RLRequestFailed(request, self.logger.error, "Request Failed"), + exc, + ) except RateLimiterError as exc: if isinstance(exc, RLErrorWithPause): await self.pause(exc.time_to_wait)