This PR addresses two issues in the request handling:
Fixed a bug where asyncio.sleep() was called without await, which could cause unexpected behavior in the rate limiting mechanism
Added explicit handling for 403 status code responses with retry logic
Technical Details
Added missing await keyword before asyncio.sleep() for proper async operation
Implemented status code 403 handling with up to 2 retry attempts
Added validation for empty response text before JSON parsing
Added appropriate error logging for 403 status scenarios
Notes
The 403 status code handling was added based on observations when using proxies, though it might be beneficial for other scenarios as well where temporary authorization issues occur.
This PR addresses two issues in the request handling:
asyncio.sleep()
was called withoutawait
, which could cause unexpected behavior in the rate limiting mechanismTechnical Details
await
keyword beforeasyncio.sleep()
for proper async operationNotes
The 403 status code handling was added based on observations when using proxies, though it might be beneficial for other scenarios as well where temporary authorization issues occur.