diff --git a/.vs/AACloud/v15/.suo b/.vs/AACloud/v15/.suo index 177d66eac..e17545c17 100644 Binary files a/.vs/AACloud/v15/.suo and b/.vs/AACloud/v15/.suo differ diff --git a/Poloniex API Client.js b/Poloniex API Client.js index ee85ebe6f..f18a0e342 100644 --- a/Poloniex API Client.js +++ b/Poloniex API Client.js @@ -403,13 +403,6 @@ logger.write("[INFO] analizeResponse -> exchangeErr = " + stringExchangeErr); logger.write("[INFO] analizeResponse -> exchangeResponse = " + stringExchangeResponse); - if (JSON.stringify(exchangeResponse).indexOf("error") > 0) { - - logger.write("[ERROR] analizeResponse -> Unexpected response from the Exchange."); - notOkCallBack(global.DEFAULT_FAIL_RESPONSE); - return; - } - if ( stringExchangeResponse.indexOf("Connection timed out") > 0 || stringExchangeResponse.indexOf("Connection Error") > 0 || @@ -426,9 +419,21 @@ } else { + if (JSON.stringify(exchangeResponse).indexOf("error") > 0) { + + logger.write("[ERROR] analizeResponse -> Unexpected response from the Exchange."); + notOkCallBack(global.DEFAULT_FAIL_RESPONSE); + return; + } + if (exchangeErr) { logger.write("[ERROR] analizeResponse -> Unexpected error trying to contact the Exchange."); + + logger.write("[ERROR] analizeResponse -> Connection timed out = " + stringExchangeResponse.indexOf("Connection timed out")); + logger.write("[ERROR] analizeResponse -> Connection Error = " + stringExchangeResponse.indexOf("Connection Error")); + logger.write("[ERROR] analizeResponse -> Bad gateway = " + stringExchangeResponse.indexOf("Bad gateway")); + notOkCallBack(global.DEFAULT_FAIL_RESPONSE); return;