Skip to content

Commit

Permalink
chore: log error to Sentry in app router error page (#18637)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj authored Jan 14, 2025
1 parent 6cd7454 commit a8c29b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/web/app/error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { captureException } from "@sentry/nextjs";
import React from "react";

import { getErrorFromUnknown } from "@calcom/lib/errors";
Expand All @@ -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(() => {
Expand Down

0 comments on commit a8c29b5

Please sign in to comment.