From f4f308e0941e6d6ae656b938db15efd655020738 Mon Sep 17 00:00:00 2001 From: Brian DeHamer Date: Wed, 9 Apr 2025 14:34:02 -0700 Subject: [PATCH] tweak logging Signed-off-by: Brian DeHamer --- dist/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2d7bbc4..6e9d7b8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -95504,18 +95504,21 @@ const fetchWithRetry = async (url, options = {}) => { const logRetry = (reason) => { proc_log_1.log.http('fetch', `${options.method} ${url} attempt ${attemptNum} failed with ${reason}`); }; - proc_log_1.log.http('fetch', `${options.method} ${url} ${base64Encode(JSON.stringify(options.headers || {}))}`); + proc_log_1.log.http('fetch', `${options.method} ${url}`); const response = await (0, make_fetch_happen_1.default)(url, { ...options, retry: false, // We're handling retries ourselves }).catch((reason) => { - logRetry(reason); + proc_log_1.log.http('fetch-response', 'caught error', reason); + // logRetry(reason); return retry(reason); }); if (retryable(response.status)) { - logRetry(response.status); + proc_log_1.log.http('fetch-response', 'retryable error', response.status, response.text()); + // logRetry(response.status); return retry(response); } + proc_log_1.log.http('fetch-response', response.status); return response; }, retryOpts(options.retry)).catch((err) => { // If we got an actual error, throw it