Skip to content

Commit

Permalink
fix exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
kfstorm committed Feb 25, 2024
1 parent e6bcd36 commit 06121e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions throttler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async def _on_request(self, request: httpx.Request):
if now < self.next_call_time:
raise Exception(
"Rate limited. Need to wait at least "
+ (self.next_call_time - now)
+ str(self.next_call_time - now)
+ " seconds before the next call."
)

Expand All @@ -28,7 +28,7 @@ async def _on_response(self, response: httpx.Response):
)
raise Exception(
"Rate limited. Need to wait at least "
+ app_config.douban_rate_limit_delay_seconds
+ str(app_config.douban_rate_limit_delay_seconds)
+ " seconds before the next call."
)

Expand Down

0 comments on commit 06121e0

Please sign in to comment.