Skip to content

Commit

Permalink
fix: remove duplicate request logging
Browse files Browse the repository at this point in the history
Caller should log on exception.
  • Loading branch information
iPromKnight committed Nov 7, 2024
1 parent d0b6352 commit 6c6d7c0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/program/utils/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ def _request(self, method: HttpMethod, endpoint: str, ignore_base_url: Optional[

except HTTPError as e:
if e.response is not None and e.response.status_code == 429:
logger.warning(f"Rate limit hit: {e}")
raise RateLimitExceeded(f"Rate limit exceeded for {url}", response=e.response) from e
else:
logger.error(f"Request failed: {e}")
raise self.custom_exception(f"Request failed: {e}") from e


Expand Down

0 comments on commit 6c6d7c0

Please sign in to comment.