Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catching "Too many request" error #40

Open
fedeiglesias opened this issue Sep 28, 2022 · 1 comment
Open

Catching "Too many request" error #40

fedeiglesias opened this issue Sep 28, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@fedeiglesias
Copy link

When I make an overload test, calling getOrderById too many times in shot amount of time, i can't catch request limit error.

My intention is to catch this error, wait 10 seconds or more and retry the request.
But using a Try-Catch block to make this happen I get always next error:

FetchError: invalid json response body at https://api.kucoin.com/api/v1/orders/62d99d248d3eb700016140dc? reason: Unexpected token < in JSON at position 0

I was digging into the createHttp lib, I think this can be the problem

}).then(res => {

Can anyone give me some help on this?

@iamalanal iamalanal added the help wanted Extra attention is needed label Jul 24, 2024
@ISAAC-XXYYZZ ISAAC-XXYYZZ self-assigned this Aug 13, 2024
@ISAAC-XXYYZZ ISAAC-XXYYZZ added enhancement New feature or request and removed help wanted Extra attention is needed labels Aug 13, 2024
@ISAAC-XXYYZZ
Copy link

Our backend system has a strict rate-limiting policy. Please refer to it here: https://www.kucoin.com/docs/basic-info/request-rate-limit/rest-api. Currently, rate-limiting information is not passed to the caller (in the headers), but we plan to include this in future iterations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants