chore: log error to Sentry in app router error page (#18637)

This commit is contained in:
Benny Joo
2025-01-14 15:23:07 +00:00
committed by GitHub
parent 6cd7454f43
commit a8c29b5459
+4
View File
@@ -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(() => {