From f5947776c386a3fee6005a0c4553289a9e8fb9c3 Mon Sep 17 00:00:00 2001 From: Amy Kapernick Date: Fri, 5 Jul 2024 09:01:59 +0800 Subject: [PATCH] added error tracking --- utils/fetchData/currentGuest.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/fetchData/currentGuest.ts b/utils/fetchData/currentGuest.ts index 68e6ab9..393ca94 100644 --- a/utils/fetchData/currentGuest.ts +++ b/utils/fetchData/currentGuest.ts @@ -1,6 +1,7 @@ import { currentUser } from "@clerk/nextjs/server"; import type { NotionGuest } from "@ts/people"; import type { User } from "@clerk/nextjs/server"; +import { captureException } from "@sentry/nextjs"; import notion from './notion' const fetchCurrentGuest = async (guestId?: string) => @@ -37,6 +38,11 @@ const fetchCurrentGuest = async (guestId?: string) => if (!guest) { console.log({ emailAddresses, data, guestId }); + captureException( + new Error( + `Guest not found: ${ email }` + ) + ); } return ({