mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-29 03:13:19 -05:00
a32b213ca5
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
23 lines
501 B
TypeScript
23 lines
501 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>
|
|
<body>
|
|
<NextError statusCode={0} />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|