Summary
Use the information from the Retry-After field to improve timing of reqeusts instead of a hard coded interval.
Motivation
The package offers a class to handle the API Rate Limit. It also handles 429 responses properly with a retry. But the retry delay is hardcoded as 1 second instead of parsing it from the response header Retry-After. Not critical but more efficient and robust if we ever change the refill interval and how many tokens there are in each interval.
Proposed Solution
No response
Alternatives Considered
No response
Additional Context
No response
Summary
Use the information from the
Retry-Afterfield to improve timing of reqeusts instead of a hard coded interval.Motivation
The package offers a class to handle the API Rate Limit. It also handles 429 responses properly with a retry. But the retry delay is hardcoded as 1 second instead of parsing it from the response header
Retry-After. Not critical but more efficient and robust if we ever change the refill interval and how many tokens there are in each interval.Proposed Solution
No response
Alternatives Considered
No response
Additional Context
No response