This commit is contained in:
Jordi Enric committed 2025-08-06 18:38:02 +02:00
1 parent f6fa4987c5
commit cbbcc2505f
1 file changed
+5
+5
View File
@@ -51,6 +51,7 @@ import { Telemetry } from 'lib/telemetry'
import { AppPropsWithLayout } from 'types'
import { SonnerToaster, TooltipProvider } from 'ui'
import { CommandProvider } from 'ui-patterns/CommandMenu'
import { useRouter } from 'next/router'
dayjs.extend(customParseFormat)
dayjs.extend(utc)
@@ -77,12 +78,16 @@ loader.config({
function CustomApp({ Component, pageProps }: AppPropsWithLayout) {
const queryClient = useRootQueryClient()
const router = useRouter()
const getLayout = Component.getLayout ?? ((page) => page)
const errorBoundaryHandler = (error: Error, info: ErrorInfo) => {
Sentry.withScope(function (scope) {
scope.setTag('globalErrorBoundary', true)
// [Jordi] pathname is used in Sentry dashboards to group data. Since it doesn't send the actual project ref, instead it just sends the name of the param (e.g. /dashboard/[ref]/database/tables)
scope.setTag('route', router.pathname)
Sentry.captureException(error)
})