chore: log error to Sentry in app router error page (#18637)
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user