diff --git a/pages/api/send.ts b/pages/api/send.ts index 8c71727b..232e631d 100644 --- a/pages/api/send.ts +++ b/pages/api/send.ts @@ -52,7 +52,7 @@ export default async (req: NextApiRequestCollect, res: NextApiResponse) => { const { type, payload } = getJsonBody(req); if (type !== 'event') { - return badRequest(res); + return badRequest(res, 'Wrong payload type.'); } const { url, referrer, name: eventName, data: eventData, title: pageTitle } = payload;