From a8c29b545959f71c980cb7cbb190d79fb10b74fb Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Tue, 14 Jan 2025 10:23:07 -0500 Subject: [PATCH] chore: log error to Sentry in app router error page (#18637) --- apps/web/app/error.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/web/app/error.tsx b/apps/web/app/error.tsx index 750972ecadc7f8..2a8ad617c4cb4d 100644 --- a/apps/web/app/error.tsx +++ b/apps/web/app/error.tsx @@ -1,5 +1,6 @@ "use client"; +import { captureException } from "@sentry/nextjs"; import React from "react"; import { getErrorFromUnknown } from "@calcom/lib/errors"; @@ -19,6 +20,9 @@ type ErrorProps = { export default function Error({ error, reset }: ErrorProps) { React.useEffect(() => { log.error(error); + + // Log the error to Sentry + captureException(error); }, [error]); const processedError = React.useMemo(() => {