From 0001c2076058fbf6cc350537a3568fcf247963c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Bigio?= Date: Mon, 11 Jan 2016 09:37:50 -0800 Subject: [PATCH] Include socket interface logs when timing out on transformer Reviewed By: davidaurelio Differential Revision: D2819820 fb-gh-sync-id: 066fd1191c459cf3434899de6326e25f798c4b07 --- react-packager/src/SocketInterface/SocketClient.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/react-packager/src/SocketInterface/SocketClient.js b/react-packager/src/SocketInterface/SocketClient.js index a344f5d9..c0016e17 100644 --- a/react-packager/src/SocketInterface/SocketClient.js +++ b/react-packager/src/SocketInterface/SocketClient.js @@ -136,9 +136,12 @@ class SocketClient { delete this._resolvers[message.id]; if (message.type === 'error') { - resolver.reject(new Error( - message.data + '\n' + 'See logs ' + LOG_PATH - )); + const errorLog = + message.data && message.data.indexOf('TimeoutError') === -1 + ? 'See logs ' + LOG_PATH + : getServerLogs(); + + resolver.reject(new Error(message.data + '\n' + errorLog)); } else { resolver.resolve(message.data); }