diff --git a/serverless/packages/functions/src/notifications/email.ts b/serverless/packages/functions/src/notifications/email.ts index fa1f2d0bc..07d78e423 100644 --- a/serverless/packages/functions/src/notifications/email.ts +++ b/serverless/packages/functions/src/notifications/email.ts @@ -4,6 +4,7 @@ import { SendEmailCommand, SendEmailCommandInput, } from "@aws-sdk/client-sesv2"; +import assert from "assert"; const DLP_EMAIL = "dlp@datasciencegt.org"; @@ -17,6 +18,7 @@ export const handler: APIGatewayProxyHandlerV2 = async (event) => { }; } + assert(event.body, "event.body is undefined"); const bodyJson = JSON.parse(event.body); const {