Spaces:
Sleeping
Sleeping
Download pages/dev/example-error.vue from asemxin2000/wechat-article: direct link, hf CLI and curl.
- Browser
- Download file 585 Bytes
-
https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/pages/dev/example-error.vue
- Command line
-
hf download hf://spaces/asemxin2000/wechat-article/pages/dev/example-error.vue
-
curl -L -o example-error.vue https://huggingface.co/spaces/asemxin2000/wechat-article/resolve/main/pages/dev/example-error.vue
585 Bytes
| <script setup> | |
| import * as Sentry from '@sentry/nuxt'; | |
| import { request } from '#shared/utils/request.ts'; | |
| function triggerClientError() { | |
| throw new Error('Nuxt Button Error'); | |
| } | |
| function getSentryData() { | |
| Sentry.startSpan( | |
| { | |
| name: 'Example Frontend Span', | |
| op: 'test', | |
| }, | |
| async () => { | |
| await request('/api/sentry-example'); | |
| } | |
| ); | |
| } | |
| </script> | |
| <template> | |
| <button id="errorBtn" @click="triggerClientError">Throw Client Error</button> | |
| <button type="button" @click="getSentryData">Throw Server Error</button> | |
| </template> | |