add Sentry
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 3m36s
Publish Docker Image / docker (ubuntu-latest) (push) Successful in 4m27s

This commit is contained in:
Lee
2024-04-26 22:07:02 +01:00
parent 46ef8ba4a7
commit 8d07092dc4
9 changed files with 499 additions and 13 deletions

19
src/app/global-error.jsx Normal file
View File

@ -0,0 +1,19 @@
"use client";
import * as Sentry from "@sentry/nextjs";
import Error from "next/error";
import { useEffect } from "react";
export default function GlobalError({ error }) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
return (
<html>
<body>
<Error />
</body>
</html>
);
}