Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Updated error message.

Mike Caob77657faa64f
diff --git a/pages/api/send.ts b/pages/api/send.ts
index 8c71727ba..232e631df 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<CollectRequestBody>(req);
if (type !== 'event') {
- return badRequest(res);
+ return badRequest(res, 'Wrong payload type.');
}
const { url, referrer, name: eventName, data: eventData, title: pageTitle } = payload;