Bug Understanding the Exchange Errors Fixed

This commit is contained in:
Luis Fernando Molina committed 2018-04-28 12:46:13 +02:00
1 parent 49d24790b1
commit 83f1bd7082
2 files changed
+12 -7

No files matched your search

Binary file not shown.
+12 -7
View File
@@ -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;