dedis/cothority

Better error-report in websocket.ts

ineiti opened this issue · 1 comments

The current websocket.ts onClose method does not a good job if the underlying websocket library only returns a code without a reason.

Suggested fix:

  • do a switch with all websocket close codes and return the string if no reason is given.

https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent

nkcr commented

+1 would be very appreciated for Columbus, as right now if the socket times out we only have a no message error.