From 8c01cb7268ce127cdd74a711c63b5970e3fdfa5d Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 15 Mar 2016 20:59:04 -0700 Subject: [PATCH] do not throw and crash client --- lib/client/websocket-tracker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/websocket-tracker.js b/lib/client/websocket-tracker.js index 3dbeb50..83b6239 100644 --- a/lib/client/websocket-tracker.js +++ b/lib/client/websocket-tracker.js @@ -154,7 +154,7 @@ WebSocketTracker.prototype._onSocketData = function (data) { } else if (data.action === 'scrape') { self._onScrapeResponse(data) } else { - throw new Error('invalid action in WS response: ' + data.action) + self._onSocketError(new Error('invalid action in WS response: ' + data.action)) } }