Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update fetch-with-retry.ts

Steven Teyae920699eb77
diff --git a/packages/utils/src/functions/fetch-with-retry.ts b/packages/utils/src/functions/fetch-with-retry.ts
index 299dd26dfb..f5716d59b2 100644
--- a/packages/utils/src/functions/fetch-with-retry.ts
+++ b/packages/utils/src/functions/fetch-with-retry.ts
@@ -50,7 +50,7 @@ export async function fetchWithRetry(
} catch {
errorMessage = `HTTP error ${response.status}`;
}
- console.error(errorMessage);
+ console.error(`fetchWithRetry error: ${errorMessage}`);
throw new Error(errorMessage);
}
} catch (error) {
@@ -60,7 +60,7 @@ export async function fetchWithRetry(
// If this is the last retry, throw the error
if (i === maxRetries - 1) {
const errMsg = `Failed after ${maxRetries} retries. Last error: ${lastError.message}`;
- console.error(errMsg);
+ console.error(`fetchWithRetry error: ${errMsg}`);
throw new Error(errMsg);
}