The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
store the slack credentials
Kiran K4d883b5ff85e
diff --git a/apps/web/app/api/slack/callback/route.ts b/apps/web/app/api/slack/callback/route.tsindex 854fc6572c..760c9d5172 100644--- a/apps/web/app/api/slack/callback/route.ts+++ b/apps/web/app/api/slack/callback/route.ts@@ -1,4 +1,4 @@-import { DubApiError } from "@/lib/api/errors";+import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";import { getSession } from "@/lib/auth";import { installIntegration } from "@/lib/integration/install";import { SlackCredential } from "@/lib/integration/slack/type";@@ -77,9 +77,8 @@ export const GET = async (req: Request) => {credentials,});} catch (e: any) {- console.error(e);- redirect(`/integrations/slack?error=${e.message}`);+ return handleAndReturnErrorResponse(e);}- redirect(`${workspace?.slug}/integrations/slack`);+ redirect(`${workspace.slug}/integrations/slack`);};