question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Accessing response headers in case of Error 429

See original GitHub issue

Hi

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:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
greg-dbcommented, Apr 13, 2017

Hi Adi, apologies this isn’t more clearly documented. The Retry-After header you’re looking for should be exposed in the JavaScript SDK as AuthRateLimitError.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.

0reactions
greg-dbcommented, Jan 23, 2018

This is working in the latest version of the SDK.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found