Skip to content

Commit

Permalink
debug logging test
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdozier committed Jun 4, 2024
1 parent 843b536 commit 2062ea5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default async function fetchWithRetry(
let timeoutId;

try {
console.log(`Fetching ${url} with ${timeoutInSeconds} seconds timeout and will try ${tries} time(s).`);
controller = new AbortController();
timeoutId = setTimeout(() => controller.abort(), timeoutInSeconds * 1000);
response = await fetch(url, {
Expand All @@ -37,6 +38,8 @@ export default async function fetchWithRetry(
...headers
}, ...init});

console.log(`Response status: ${response.status}`);
console.log(`timeoutId: ${timeoutId}`);
clearTimeout(timeoutId);

if (response.ok) {
Expand Down

0 comments on commit 2062ea5

Please sign in to comment.