How to catch `WebSocket connection to ‘ws://xxx:nn’ failed: Connection closed before receiving a handshake response` error?

You can register for onError callback of websocket object

exampleSocket.onerror=function(event){
    console.log("Error");
}

You can refer following example.
http://jsfiddle.net/g28yuymv/1/

catching error example
http://jsfiddle.net/g28yuymv/4/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)