From 9dd876c4f06d1c5aab9078b9c8c9d02c5cd43dd7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 12 Apr 2020 10:38:13 +0200 Subject: [PATCH] Update User.Bot.js --- Historic-OHLCVs/User.Bot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Historic-OHLCVs/User.Bot.js b/Historic-OHLCVs/User.Bot.js index eb3061ecc..9bdde8bc2 100644 --- a/Historic-OHLCVs/User.Bot.js +++ b/Historic-OHLCVs/User.Bot.js @@ -354,6 +354,11 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, FILE_S return } + if (err.stack.toString().indexOf('ExchangeNotAvailable') >= 0) { + logger.write(MODULE_NAME, "[ERROR] start -> getOHLCVs -> Retrying Later -> The Exchange " + bot.exchange + " is not responding at the moment. I will save the data already fetched and try to reconnect later to fetch the rest of the missing data."); + return + } + logger.write(MODULE_NAME, "[ERROR] start -> getOHLCVs -> Retrying Later -> err = " + err.stack); callBackFunction(global.DEFAULT_RETRY_RESPONSE); abort = true