diff --git a/.vs/AACloud/v15/.suo b/.vs/AACloud/v15/.suo index f038353ed..52ba4088b 100644 Binary files a/.vs/AACloud/v15/.suo and b/.vs/AACloud/v15/.suo differ diff --git a/File Storage.js b/File Storage.js index 9ab17e48f..42b6484f0 100644 --- a/File Storage.js +++ b/File Storage.js @@ -119,7 +119,7 @@ exports.newFileStorage = function newFileStorage(BOT) { logger.write("[ERROR] createFolder -> onFolderCreated -> result = " + JSON.stringify(result)); logger.write("[ERROR] createFolder -> onFolderCreated -> response = " + JSON.stringify(response)); - if (err.message.indexOf("The server is busy") > 0 + if (err.code === 'ServerBusy' || err.code === 'ECONNRESET' || err.code === 'ENOTFOUND' || err.code === 'ESOCKETTIMEDOUT' @@ -197,7 +197,7 @@ exports.newFileStorage = function newFileStorage(BOT) { logger.write("[ERROR] createTextFile -> onFileCreated -> result = " + JSON.stringify(result)); logger.write("[ERROR] createTextFile -> onFileCreated -> response = " + JSON.stringify(response)); - if (err.message.indexOf("The server is busy") > 0 + if (err.code === 'ServerBusy' || err.code === 'ECONNRESET' || err.code === 'ENOTFOUND' || err.code === 'ESOCKETTIMEDOUT' @@ -274,7 +274,7 @@ exports.newFileStorage = function newFileStorage(BOT) { if (err) { - if (err.message.indexOf("The server is busy") > 0 + if (err.code === 'ServerBusy' || err.code === 'ECONNRESET' || err.code === 'ENOTFOUND' || err.code === 'ESOCKETTIMEDOUT' @@ -334,7 +334,6 @@ exports.newFileStorage = function newFileStorage(BOT) { } - logger.write("[ERROR] getTextFile -> onFileReceived -> Dont know what to do here. Cancelling operation. "); callBackFunction(global.DEFAULT_FAIL_RESPONSE);