Skip to content

Commit b194011

Browse files
committed
Move Sentry client initialization for SSR routes from root folder to ensure it is bundled
1 parent 6444b7f commit b194011

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/api/_errors/apiFunctionHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createHash } from 'node:crypto'
22
import { captureException, withScope } from '@sentry/astro'
33
import { ensureApiSentry } from '@pages/api/_sentry'
4-
import { isProd, isTest } from '@pages/api/_environment'
4+
import { isProd, isTest } from '@pages/api/_environment/environmentApi'
55
import { ApiFunctionError, type ApiFunctionErrorParams } from './ApiFunctionError'
66

77
ensureApiSentry()

src/pages/api/_sentry/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { init as sentryInit } from '@sentry/astro'
2-
import { getPackageRelease, getSentryDsn, isDev, isProd } from '@pages/api/_environment'
2+
import { getPackageRelease, getSentryDsn, isDev, isProd } from '@pages/api/_environment/environmentApi'
33

44
let initialized = false
55

0 commit comments

Comments
 (0)