anjanms / DubAPI

A Node.js API for creating queup.net bots.
MIT License
20 stars 10 forks source link

Throw Ably errors when found #30

Closed FranciscoG closed 7 years ago

FranciscoG commented 8 years ago

One of the main reasons my bot hangs is because of Ably errors that don't necessarily throw and stop my main node process but it just hangs and stops working. I'm wondering if there was a better way to catch and throw these type of errors in your lib

Bellow is what my PM2 logs show, it finally just gave up at that last line and I had to manually restart it.

They seem to be coming from this file or this file in the Ably lib. Not sure what could be done but figured I'd mention it in case you have any ideas.

thanks!

0|bot      | Ably: ConnectionManager.activateTransport(): error = [ErrorInfo: Unable to recover connection: not found (7uFB9Y-us_z3QmhI); statusCode=400; code=80008]
0|bot      | Ably: ConnectionManager.activateTransport(): error = [ErrorInfo: Unable to recover connection: not found (DtP2d1cAiJK8nEO5); statusCode=400; code=80008]
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1006
0|bot      | Ably: ConnectionManager.activateTransport(): error = [ErrorInfo: Unable to recover connection: not found (3L6sCLGEKMzIDtt7); statusCode=400; code=80008]
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: ConnectionManager.activateTransport(): error = [ErrorInfo: Unable to recover connection: not found (HtVQ1vVzULg_ibwD); statusCode=400; code=80008]
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: WebSocketTransport.onWsClose(): Unclean disconnection of WebSocket ; code = 1008
0|bot      | Ably: ConnectionManager.activateTransport(): error = [ErrorInfo: Unable to recover connection: not found (65i7UBlwUnePNTXj); statusCode=400; code=80008]