Include socket interface logs when timing out on transformer

Reviewed By: davidaurelio

Differential Revision: D2819820

fb-gh-sync-id: 066fd1191c459cf3434899de6326e25f798c4b07
This commit is contained in:
Martín Bigio 2016-01-11 09:37:50 -08:00 committed by facebook-github-bot-4
parent 1abc04ba19
commit cb91d652fa
1 changed files with 6 additions and 3 deletions

View File

@ -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);
}