From b69a638feeab9b98fcb3873232532b0ca9052a3b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 29 May 2018 08:32:20 +0200 Subject: [PATCH] New err.code found to consider when accessing azure storage --- BlobStorage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BlobStorage.js b/BlobStorage.js index 6fafbcd5a..d9d845cd2 100644 --- a/BlobStorage.js +++ b/BlobStorage.js @@ -134,7 +134,8 @@ exports.newBlobStorage = function newBlobStorage(BOT) { || err.code === 'ENOTFOUND' || err.code === 'ESOCKETTIMEDOUT' || err.code === 'ETIMEDOUT' - || err.code === 'ECONNREFUSED') { + || err.code === 'ECONNREFUSED' + || (err.code === 'AuthenticationFailed' && err.authenticationerrordetail.indexOf('Request date header too old') === 0)) { setTimeout(secondTry, 1000); return; @@ -212,7 +213,8 @@ exports.newBlobStorage = function newBlobStorage(BOT) { || err.code === 'ENOTFOUND' || err.code === 'ESOCKETTIMEDOUT' || err.code === 'ETIMEDOUT' - || err.code === 'ECONNREFUSED') { + || err.code === 'ECONNREFUSED' + || (err.code === 'AuthenticationFailed' && err.authenticationerrordetail.indexOf('Request date header too old') === 0)) { setTimeout(secondTry, 1000); return;