mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-30 21:01:54 +08:00
24 lines
499 B
TypeScript
24 lines
499 B
TypeScript
"use client";
|
|
|
|
import * as Sentry from "@sentry/nextjs";
|
|
import { captureError } from "@stackframe/stack-shared/dist/utils/errors";
|
|
import Error from "next/error";
|
|
import { useEffect } from "react";
|
|
|
|
export default function GlobalError({ error }: any) {
|
|
useEffect(() => {
|
|
captureError("backend-global-error", error);
|
|
}, [error]);
|
|
|
|
return (
|
|
<html>
|
|
<body>
|
|
[An unhandled error occurred.]
|
|
<Error
|
|
statusCode={500}
|
|
/>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|