Accessing response headers in case of Error 429
See original GitHub issueHi
The HTTP documentation here suggests looking up the Retry-After
response header in case of a 429 error.
Are response headers exposed anywhere through the JS SDK?
I found this AuthRateLimitError
, but it isn’t referenced anywhere in the documentation, so not sure where if it is being used.
Cheers!
Adi
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
What an HTTP Error 429 Means & How to Fix It - HubSpot Blog
The simplest way to fix an HTTP 429 error is to wait to send another request. Often, this status code is sent with...
Read more >Improved 429 Response Headers for Rate Limits - Medium
When you receive a 429 Too Many Requests response, your app must respond appropriately or risk getting your service severely disrupted. After ...
Read more >How to avoid HTTP error 429 (Too Many Requests) python
Receiving a status 429 is not an error, it is the other server "kindly" asking you to please stop spamming requests.
Read more >How to Fix 429 Too Many Requests Error Code - Hostinger
One of these HTTP codes is 429 Too Many Requests. As the name suggests, this code appears whenever someone repeatedly accesses a website...
Read more >How to Fix 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi Adi, apologies this isn’t more clearly documented. The
Retry-After
header you’re looking for should be exposed in the JavaScript SDK asAuthRateLimitError.retry_after
. You would use that value to know how many seconds to wait before retrying the request.It looks like there’s currently an issue in the SDK where this doesn’t actually get populated though. We’ll look into it and follow up here once we have that fixed.
This is working in the latest version of the SDK.