bitstamp icon indicating copy to clipboard operation
bitstamp copied to clipboard

When rate limited the message is not passed to the API user

Open jopann opened this issue 7 years ago • 1 comments

When too many calls are made to the private API, Bitstamp will temporarily block the requests and inform us of it.

In Bitstamp.prototype._request:

the res.StatusCode is 200, however the buffer cannot be parsed as JSON. This results in messages like "SyntaxError: Unexpected token . in JSON at position 6" being passed as the error to the API callback.

Instead can we either return a BitstampError with the raw buffer text or include the raw buffer text in some other way.

jopann avatar Feb 27 '18 20:02 jopann

When this happens, the buffer we get back is something like "10.10.10.10 blocked for 900 seconds"

jopann avatar Feb 27 '18 21:02 jopann