From 0632b91e2acb3456b56c3b5a1be54b29d1b27d5b Mon Sep 17 00:00:00 2001 From: yatishbalaji Date: Wed, 8 Sep 2021 12:35:40 +0530 Subject: [PATCH] feat: add url to retrying log --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 722ac72..dc6f520 100644 --- a/index.js +++ b/index.js @@ -166,7 +166,7 @@ module.exports = async function (url, options) { return resolve(response); } - console.error(`Retrying in ${retryOptions.retryInitialDelay} milliseconds, attempt ${attempt - 1} failed (status ${response.status}): ${response.statusText}`); + console.error(`Retrying ${url} in ${retryOptions.retryInitialDelay} milliseconds, attempt ${attempt - 1} failed (status ${response.status}): ${response.statusText}`); } catch (error) { clearTimeout(timeoutHandler); @@ -178,7 +178,7 @@ module.exports = async function (url, options) { return reject(error); } - console.error(`Retrying in ${retryOptions.retryInitialDelay} milliseconds, attempt ${attempt - 1} error: ${error.message}`); + console.error(`Retrying ${url} in ${retryOptions.retryInitialDelay} milliseconds, attempt ${attempt - 1} error: ${error.message}`); } retryOptions.retryInitialDelay *= retryOptions.retryBackoff; // update retry interval