diff --git a/CHANGELOG.md b/CHANGELOG.md index 279688f27..fbf2a01e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - feat(nextjs): Add connectivity check to example page([#951](https://github.com/getsentry/sentry-wizard/pull/951)) - feat(nextjs): Improve error names in example page to better differentiate between frontend and API errors ([#944](https://github.com/getsentry/sentry-wizard/pull/944)) - fix(remix): linting issues in generated client init code ([#949](https://github.com/getsentry/sentry-wizard/pull/949)) +- feat(nuxt): Add connectivity check to example page ([#966](https://github.com/getsentry/sentry-wizard/pull/966)) - feat(remix): Add connectivity check to example page([#967](https://github.com/getsentry/sentry-wizard/pull/967)) ## 4.7.0 diff --git a/src/nuxt/templates.ts b/src/nuxt/templates.ts index 6b62fdc53..536257a9b 100644 --- a/src/nuxt/templates.ts +++ b/src/nuxt/templates.ts @@ -158,6 +158,16 @@ Feel free to delete this file. import { useFetch} from '#imports' const hasSentError = ref(false); + const isConnected = ref(true); + + onMounted(async () => { + try { + const result = await Sentry.diagnoseSdkConnectivity(); + isConnected.value = result !== 'sentry-unreachable'; + } catch (error) { + isConnected.value = false; + } + }); function getSentryData() { Sentry.startSpan( @@ -205,6 +215,9 @@ Feel free to delete this file.
Sample error was sent to Sentry.
+The Sentry SDK is not able to reach Sentry right now - this may be due to an adblocker. For more information, see the troubleshooting guide.
+