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 comments

Steven Tey667cb7c60c8c
diff --git a/apps/web/lib/middleware/bitly.ts b/apps/web/lib/middleware/bitly.ts
index e3932c8fe1..fc3757c847 100644
--- a/apps/web/lib/middleware/bitly.ts
+++ b/apps/web/lib/middleware/bitly.ts
@@ -109,7 +109,9 @@ async function crawlBitlyLink({
});
if (!response.ok && response.status !== 301 && response.status !== 302) {
- console.error(`[Bitly] Link ${domain}/${shortKey} not found.`);
+ console.error(
+ `[Bitly] Link ${domain}/${shortKey} not found. Falling back to API...`,
+ );
return await fetchBitlyLink({ domain, shortKey, workspaceId });
}
@@ -155,7 +157,7 @@ async function fetchBitlyLink({
if (!response.ok) {
console.log(
- `[Bitly] Hit rate limit, returning 404 for ${domain}/${shortKey}`,
+ `[Bitly] Hit rate limit, returning 404 for ${domain}/${shortKey} for now...`,
);
return null;
}