diff --git a/packages/app-store/sendgrid/api/_postAdd.ts b/packages/app-store/sendgrid/api/_postAdd.ts index fbec85e005..dd7a6d7813 100644 --- a/packages/app-store/sendgrid/api/_postAdd.ts +++ b/packages/app-store/sendgrid/api/_postAdd.ts @@ -29,7 +29,6 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) { }); } catch (reason) { logger.error("Could not add Sendgrid app", reason); - throw new HttpError({ message: "Could not add Sendgrid app", statusCode: 500 }); } return { url: "/apps/installed/other?hl=sendgrid" }; diff --git a/packages/app-store/sendgrid/api/_postCheck.ts b/packages/app-store/sendgrid/api/_postCheck.ts index 57c8f44247..89aad1e02c 100644 --- a/packages/app-store/sendgrid/api/_postCheck.ts +++ b/packages/app-store/sendgrid/api/_postCheck.ts @@ -2,6 +2,7 @@ import type { NextApiRequest, NextApiResponse } from "next"; import Sendgrid from "@calcom/lib/Sendgrid"; import { HttpError } from "@calcom/lib/http-error"; +import logger from "@calcom/lib/logger"; import { defaultResponder } from "@calcom/lib/server"; import checkSession from "../../_utils/auth"; @@ -19,10 +20,10 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) { if (usernameInfo.username) { return {}; } else { - throw new HttpError({ statusCode: 404 }); + logger.error("Could not check Sendgrid app API key"); } } catch (e) { - throw new HttpError({ statusCode: 500, message: e as string }); + logger.error("Could not check Sendgrid app API key", e); } }