got icon indicating copy to clipboard operation
got copied to clipboard

Too Many Requests Error

Open Sa7cez opened this issue 2 years ago • 5 comments

I'm rewriting the code from Python to JS. I'm encountering an issue with requests.

I'm sending requests with the same headers and from the same IP address. In Python, I'm using popular 'requests' library, and the requests go through without any problems.

However, when using 'Got' in JS, I'm getting a 429 error on the 3rd or 4th request. What could be the reason for this? How can I add more browser-like behavior to the request?

Sa7cez avatar Sep 30 '23 21:09 Sa7cez

Got retries requests by default. You could try to turn that off.

sindresorhus avatar Oct 01 '23 05:10 sindresorhus

How Can i Off retries request

sumit-sen-90 avatar Jan 29 '24 14:01 sumit-sen-90

@sumit-sen-90 - based on the docs:

By default, Got will retry on failure. To disable this option, set options.retry.limit to 0.

noxify avatar Jan 30 '24 11:01 noxify

HAVE YOU ANY TESTED CODE WHICH IS WORKING WITH 0 RETRY MECHANISM ???? PLEASE PROVIDE

sumit-sen-90 avatar Feb 01 '24 18:02 sumit-sen-90

Hi @sumit-sen-90 ,

here a quick example: https://github.com/noxify/honojs-got

btw. you should check your keyboard, it seems you have a problem with your capslock ;)

tbh - for me it sounds like, that there is a misconfiguration in your setup, since it works as described in the docs. Maybe sharing the relevant code could help ;)

noxify avatar Feb 06 '24 11:02 noxify