diff --git a/packages/app-store/sendgrid/api/_postAdd.ts b/packages/app-store/sendgrid/api/_postAdd.ts index dd7a6d7813..3808a99b23 100644 --- a/packages/app-store/sendgrid/api/_postAdd.ts +++ b/packages/app-store/sendgrid/api/_postAdd.ts @@ -28,7 +28,7 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) { data, }); } catch (reason) { - logger.error("Could not add Sendgrid app", reason); + return { error: true }; } 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 89aad1e02c..5e97647648 100644 --- a/packages/app-store/sendgrid/api/_postCheck.ts +++ b/packages/app-store/sendgrid/api/_postCheck.ts @@ -20,10 +20,10 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) { if (usernameInfo.username) { return {}; } else { - logger.error("Could not check Sendgrid app API key"); + return { error: true }; } } catch (e) { - logger.error("Could not check Sendgrid app API key", e); + return { error: true }; } }