Scheduling infrastructure for absolutely everyone.
Fix API handler response termination logic (#22575)
Omar Lópezf67522dbbd17
diff --git a/apps/web/pages/api/integrations/[...args].ts b/apps/web/pages/api/integrations/[...args].tsindex 4c2c343feb5..b77c17252cc 100644--- a/apps/web/pages/api/integrations/[...args].ts+++ b/apps/web/pages/api/integrations/[...args].ts@@ -71,8 +71,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {const redirectUrl = handler.redirect?.url ?? undefined;res.json({ url: redirectUrl, newTab: handler.redirect?.newTab });}- if (!res.writableEnded) return res.status(200);- return res;+ if (!res.writableEnded) res.status(200);+ return;} catch (error) {console.error(error);if (error instanceof HttpError) {