The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: share Sentry browser-noise filters between studio and docs FE-4392 (#50407)
Ali Waseem5b099ee03f50
diff --git a/apps/docs/instrumentation-client.ts b/apps/docs/instrumentation-client.tsindex e3490825598..970e2e6ec28 100644--- a/apps/docs/instrumentation-client.ts+++ b/apps/docs/instrumentation-client.ts@@ -4,7 +4,7 @@import * as Sentry from '@sentry/nextjs'import { hasConsented, IS_PLATFORM } from 'common'-import { filterSentryEvent } from 'common/sentry'+import { BROWSER_NOISE_IGNORE_ERRORS, filterSentryEvent } from 'common/sentry'import { IS_DEV } from './lib/constants'@@ -24,6 +24,8 @@ if (!IS_DEV) {],ignoreErrors: [+ ...BROWSER_NOISE_IGNORE_ERRORS,+// [Charis 2025-05-05]// We should fix hydration problems but let's not make this a blocker for// now.diff --git a/apps/studio/lib/sentry-client-options.ts b/apps/studio/lib/sentry-client-options.tsindex d2d24b6af39..9e9e5cb0ae4 100644--- a/apps/studio/lib/sentry-client-options.ts+++ b/apps/studio/lib/sentry-client-options.ts@@ -16,7 +16,11 @@ import * as Sentry from '@sentry/react'import { thirdPartyErrorFilterIntegration } from '@sentry/react'import { hasConsented } from 'common'import { IS_PLATFORM } from 'common/constants/environment'-import { filterSentryEvent, isSentryErrorBoundaryCrash } from 'common/sentry'+import {+ BROWSER_NOISE_IGNORE_ERRORS,+ filterSentryEvent,+ isSentryErrorBoundaryCrash,+} from 'common/sentry'import { MIRRORED_BREADCRUMBS } from '@/lib/breadcrumbs'import { sanitizeArrayOfObjects, sanitizeUrlHashParams } from '@/lib/sanitize'@@ -256,34 +260,7 @@ export function buildSentryClientOptions({// sql-formatter lexer on invalid SQL input/^Parse error: Unexpected ".+" at line \d+ column \d+$/,- // === Network / infrastructure (not actionable on FE) ===- /504 Gateway Time-out/,- 'Network request failed',- 'Failed to fetch',- 'Load failed',- 'AbortError',- 'TypeError: cancelled',- 'TypeError: Cancelled',-- // === Browser extensions & Google Translate DOM manipulation ===- 'Node.insertBefore: Child to insert before is not a child of this node',- 'Node.removeChild: The node to be removed is not a child of this node',- "NotFoundError: Failed to execute 'removeChild' on 'Node'",- "NotFoundError: Failed to execute 'insertBefore' on 'Node'",- 'NotFoundError: The object can not be found here.',- "Cannot read properties of null (reading 'parentNode')",- "Cannot read properties of null (reading 'removeChild')",- "TypeError: can't access dead object",- /^NS_ERROR_/,-- // === Non-Error throws (extensions, third-party libs throwing strings/objects) ===- 'Non-Error exception captured',- 'Non-Error promise rejection captured',- /^Object captured as exception with keys:/,-- // === Cross-origin script errors (no useful info) ===- 'Script error.',- 'Script error',+ ...BROWSER_NOISE_IGNORE_ERRORS,// === React hydration mismatches caused by extensions modifying DOM ===// Note: we only suppress the generic browser messages, NOT "Hydration failed because..."diff --git a/packages/common/sentry.ts b/packages/common/sentry.tsindex 3e2eb63a33b..d1573a6ebae 100644--- a/packages/common/sentry.ts+++ b/packages/common/sentry.ts@@ -32,3 +32,34 @@ export function filterSentryEvent<T extends SentryEventTags>(return event}++export const BROWSER_NOISE_IGNORE_ERRORS: (string | RegExp)[] = [+ // === Network / infrastructure (not actionable on FE) ===+ /504 Gateway Time-out/,+ 'Network request failed',+ 'Failed to fetch',+ 'Load failed',+ 'AbortError',+ 'TypeError: cancelled',+ 'TypeError: Cancelled',++ // === Browser extensions & Google Translate DOM manipulation ===+ 'Node.insertBefore: Child to insert before is not a child of this node',+ 'Node.removeChild: The node to be removed is not a child of this node',+ "NotFoundError: Failed to execute 'removeChild' on 'Node'",+ "NotFoundError: Failed to execute 'insertBefore' on 'Node'",+ 'NotFoundError: The object can not be found here.',+ "Cannot read properties of null (reading 'parentNode')",+ "Cannot read properties of null (reading 'removeChild')",+ "TypeError: can't access dead object",+ /^NS_ERROR_/,++ // === Non-Error throws (extensions, third-party libs throwing strings/objects) ===+ 'Non-Error exception captured',+ 'Non-Error promise rejection captured',+ /^Object captured as exception with keys:/,++ // === Cross-origin script errors (no useful info) ===+ 'Script error.',+ 'Script error',+]