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 publishable-key.ts

Steven Teydf2f31c8bd8c
diff --git a/apps/web/lib/auth/publishable-key.ts b/apps/web/lib/auth/publishable-key.ts
index 843ff0ed4f..4ae0f88426 100644
--- a/apps/web/lib/auth/publishable-key.ts
+++ b/apps/web/lib/auth/publishable-key.ts
@@ -94,6 +94,11 @@ export const withPublishableKey = (
const searchParams = getSearchParams(req.url);
return await handler({ req, params, searchParams, workspace });
+ } else {
+ throw new DubApiError({
+ code: "unauthorized",
+ message: "Unauthorized: No publishable key provided.",
+ });
}
} catch (error) {
req.log.error(error);