mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
suppress monaco related errors in sentry + replace deprecated method (#7836)
This commit is contained in:
parent
a3acbd892f
commit
f42b83a57e
2 changed files with 13 additions and 4 deletions
5
.changeset/chatty-showers-invite.md
Normal file
5
.changeset/chatty-showers-invite.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'hive': patch
|
||||
---
|
||||
|
||||
Suppress Monaco editor errors before sending to Sentry
|
||||
|
|
@ -12,7 +12,7 @@ import { Toaster } from '@/components/ui/toaster';
|
|||
import { frontendConfig } from '@/config/supertokens/frontend';
|
||||
import { env } from '@/env/frontend';
|
||||
import { urqlClient } from '@/lib/urql';
|
||||
import { configureScope, init } from '@sentry/react';
|
||||
import { getCurrentScope, init } from '@sentry/react';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import {
|
||||
createRootRoute,
|
||||
|
|
@ -102,6 +102,12 @@ if (env.sentry) {
|
|||
dist: 'webapp',
|
||||
release: env.release,
|
||||
environment: env.environment,
|
||||
ignoreErrors: [
|
||||
// Suppress specific monaco editor internal errors
|
||||
"Failed to execute 'setStart' on 'Range'",
|
||||
"Failed to execute 'setEnd' on 'Range'",
|
||||
/TextModel got disposed/,
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -114,9 +120,7 @@ const LazyTanStackRouterDevtools = lazy(() =>
|
|||
);
|
||||
|
||||
function identifyOnSentry(userId: string, email: string): void {
|
||||
configureScope(scope => {
|
||||
scope.setUser({ id: userId, email });
|
||||
});
|
||||
getCurrentScope().setUser({ id: userId, email });
|
||||
}
|
||||
|
||||
function RootComponent() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue