Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Catching "Too many request" error #40

@fedeiglesias

Description

@fedeiglesias

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?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions