-
-
Notifications
You must be signed in to change notification settings - Fork 63
feat(nuxt): add bad connection detection to example page #966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nuxt): add bad connection detection to example page #966
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #966 +/- ##
=======================================
Coverage 24.28% 24.28%
=======================================
Files 121 121
Lines 12883 12883
Branches 715 715
=======================================
Hits 3128 3128
Misses 9734 9734
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -158,6 +158,16 @@ Feel free to delete this file. | |||
import { useFetch} from '#imports' | |||
|
|||
const hasSentError = ref(false); | |||
const isConnected = ref(true); | |||
|
|||
onMounted(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using async callbacks here could lead to unexpected state updated when the component mounts/unmounts or it could lead to console warnings. But that's an edge-case thing and as this is just an example page I think it's perfectly fine.
diagnoseSdkConnectivity()
function to programmatically detect possible connectivity issues sentry-javascript#15821Before:

After:
