Handle WebSocketError when reading from websocket.