remove sentry

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-04-17 09:40:29 +02:00
committed by Carl-Gerhard Lindesvärd
parent c333d660c3
commit e11ed557dc
13 changed files with 61 additions and 408 deletions

View File

@@ -4,7 +4,6 @@ import { Input } from '@/components/ui/input';
import { getClerkError } from '@/utils/clerk-error';
import { useSignIn } from '@clerk/nextjs';
import { zodResolver } from '@hookform/resolvers/zod';
import { captureMessage } from '@sentry/nextjs';
import { useRouter } from 'next/navigation';
import { useForm } from 'react-hook-form';
import { toast } from 'sonner';
@@ -55,11 +54,7 @@ const EmailSignUp = () => {
await setActive({ session: result.createdSessionId });
router.push('/');
} else {
captureMessage('Sign in failed', {
extra: {
status: result.status,
},
});
// Error...
}
} catch (e) {
const error = getClerkError(e);

View File

@@ -1,7 +1,6 @@
'use client';
import { useEffect } from 'react';
import * as Sentry from '@sentry/nextjs';
export default function GlobalError({
error,
@@ -9,9 +8,7 @@ export default function GlobalError({
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
useEffect(() => {}, [error]);
return (
<html lang="en">

View File

@@ -24,9 +24,7 @@ export const env = createEnv({
* isn't built with invalid env vars. To expose them to the client, prefix them with
* `NEXT_PUBLIC_`.
*/
client: {
NEXT_PUBLIC_SENTRY_DSN: z.string().url(),
},
client: {},
/**
* You can't destruct `process.env` as a regular object in the Next.js edge runtimes (e.g.
@@ -35,7 +33,6 @@ export const env = createEnv({
runtimeEnv: {
DATABASE_URL: process.env.DATABASE_URL,
NODE_ENV: process.env.NODE_ENV,
NEXT_PUBLIC_SENTRY_DSN: process.env.NEXT_PUBLIC_SENTRY_DSN,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially

View File

@@ -4,12 +4,7 @@ import { authMiddleware } from '@clerk/nextjs';
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/references/nextjs/auth-middleware for more information about configuring your Middleware
export default authMiddleware({
publicRoutes: [
'/share/overview/:id',
'/api/trpc(.*)',
'/api/clerk/(.*)?',
'/monitoring',
],
publicRoutes: ['/share/overview/:id', '/api/trpc(.*)', '/api/clerk/(.*)?'],
debug: process.env.CLERK_DEBUG ? true : false,
});