Closed hems closed 8 years ago
I believe you should check res.statusCode, if it's different than 200 than it's an error !?
https://github.com/rferro/plnx/blob/master/src/index.js#L79-L86
I add a statusCode check in request callback. In my tests, the timeout can be in request or in api. For request timeout, the error already in callback. And for api timeout, the statusCode check fix the problem. Tks hems!
:8ball: would appreciate if you bump the version
version 0.0.5 published in npm
Sometimes the API timeout, for instance when calling
returnOrderBook
.I would expect this to come back as "error" on my callback or instead to have a
retry
setting that would allow the method to automatically retry before calling the error.Here is an example of the string that was received on my callback under the "data" parameter: http://pastebin.com/Xz15JsGq