Removing seemingly troubling code
parent
bcc70fc337
commit
eaae772abc
|
@ -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" };
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue