mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
23 lines
514 B
TypeScript
23 lines
514 B
TypeScript
"use client";
|
|
|
|
import * as Sentry from "@sentry/nextjs";
|
|
import NextError from "next/error";
|
|
import { useEffect } from "react";
|
|
|
|
export default function GlobalError({ error }: { error: Error & { digest?: string } }) {
|
|
useEffect(() => {
|
|
if (process.env.NODE_ENV === "development") {
|
|
console.error(error.message);
|
|
} else {
|
|
Sentry.captureException(error);
|
|
}
|
|
}, [error]);
|
|
return (
|
|
<html lang="en-US">
|
|
<body>
|
|
<NextError statusCode={0} />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|