suppress monaco related errors in sentry + replace deprecated method (#7836)

This commit is contained in:
Jonathan Brennan 2026-03-13 03:31:30 -05:00 committed by GitHub
parent a3acbd892f
commit f42b83a57e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 4 deletions

View file

@ -0,0 +1,5 @@
---
'hive': patch
---
Suppress Monaco editor errors before sending to Sentry

View file

@ -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() {