"use client"; import * as Sentry from "@sentry/nextjs"; import { ReactNode } from "react"; // Wraps the app tree so render errors are caught with React's componentStack // attached. Sentry's LinkedErrors integration picks up the componentStack from // error.cause, so events arrive in Sentry tagged with the component path // instead of collapsing into opaque React-internal frames. export function SentryErrorBoundary({ children }: { children: ReactNode }) { return ( (

Something went wrong

{error instanceof Error ? error.message : String(error)}

)} > {children}
); }