[javascript] getting the reason why websockets closed with close code 1006