mirror of
https://github.com/lukevella/rallly.git
synced 2025-07-26 20:57:24 +02:00
🔧 Update sentry config (#1196)
This commit is contained in:
parent
6df4405cf4
commit
43ead55892
3 changed files with 44 additions and 7 deletions
27
apps/web/src/global-error.tsx
Normal file
27
apps/web/src/global-error.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
"use client";
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import NextError from "next/error";
|
||||
import React from "react";
|
||||
|
||||
export default function GlobalError({
|
||||
error,
|
||||
}: {
|
||||
error: Error & { digest?: string };
|
||||
}) {
|
||||
React.useEffect(() => {
|
||||
Sentry.captureException(error);
|
||||
}, [error]);
|
||||
|
||||
return (
|
||||
<html>
|
||||
<body>
|
||||
{/* `NextError` is the default Next.js error page component. Its type
|
||||
definition requires a `statusCode` prop. However, since the App Router
|
||||
does not expose status codes for errors, we simply pass 0 to render a
|
||||
generic error message. */}
|
||||
<NextError statusCode={0} />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
9
apps/web/src/instrumentation.ts
Normal file
9
apps/web/src/instrumentation.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await import("../sentry.server.config");
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === "edge") {
|
||||
await import("../sentry.edge.config");
|
||||
}
|
||||
}
|
15
turbo.json
15
turbo.json
|
@ -69,20 +69,22 @@
|
|||
"DATABASE_URL",
|
||||
"DISABLE_LANDING_PAGE",
|
||||
"EMAIL_PROVIDER",
|
||||
"GOOGLE_CLIENT_ID",
|
||||
"GOOGLE_CLIENT_SECRET",
|
||||
"KV_REST_API_URL",
|
||||
"MAINTENANCE_MODE",
|
||||
"MICROSOFT_CLIENT_ID",
|
||||
"MICROSOFT_CLIENT_SECRET",
|
||||
"MICROSOFT_TENANT_ID",
|
||||
"NEXT_PUBLIC_*",
|
||||
"NEXT_RUNTIME",
|
||||
"NODE_ENV",
|
||||
"NOREPLY_EMAIL",
|
||||
"NOREPLY_EMAIL_NAME",
|
||||
"OIDC_NAME",
|
||||
"OIDC_DISCOVERY_URL",
|
||||
"NOREPLY_EMAIL",
|
||||
"OIDC_CLIENT_ID",
|
||||
"OIDC_CLIENT_SECRET",
|
||||
"GOOGLE_CLIENT_ID",
|
||||
"GOOGLE_CLIENT_SECRET",
|
||||
"OIDC_DISCOVERY_URL",
|
||||
"OIDC_NAME",
|
||||
"PADDLE_PUBLIC_KEY",
|
||||
"PORT",
|
||||
"SECRET_PASSWORD",
|
||||
|
@ -99,7 +101,6 @@
|
|||
"STRIPE_SECRET_KEY",
|
||||
"STRIPE_SIGNING_SECRET",
|
||||
"STRIPE_YEARLY_PRICE",
|
||||
"SUPPORT_EMAIL",
|
||||
"KV_REST_API_URL"
|
||||
"SUPPORT_EMAIL"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue