krystianity / node-bitstamp

bitstamp REST and WS API Node.js client :dollar:
MIT License
59 stars 41 forks source link

Handle errors when websocket fails to connect? #2

Closed LRonHubs closed 6 years ago

LRonHubs commented 6 years ago

How do i find /callback errors when the websocket doesnt connect?

krystianity commented 6 years ago

Hi @LRonHubs sadly the guys from bitstamp decided to go for pusher. Pusher-js error handling is saddening. However.. in terms of errors and disconnects you will have to trust "pusher-js" automatic re-connect logic.

Additionally I have added 2 new events to the streams .on("connected") and .on("disconnected") that might help.

Furthermore, if you are having trouble with connecting you might want to checkout https://github.com/pusher/pusher-js for other DEBUG options.