2022-04-06 05:56:08 +00:00
# `<NuxtErrorBoundary>`
2022-04-07 13:26:36 +00:00
Nuxt provides the `<NuxtErrorBoundary>` component to handle client-side errors happening in its default slot, using Vue's [`onErrorCaptured` hook. ](https://vuejs.org/api/composition-api-lifecycle.html#onerrorcaptured )
## Events
2022-04-07 14:02:54 +00:00
- **`@error`**: Event emitted when the default slot of the component throws an error.
2022-04-07 13:26:36 +00:00
```vue
< template >
< NuxtErrorBoundary @error =" logSomeError " >
<!-- ... -->
< / NuxtErrorBoundary >
< / template >
```
2022-04-06 05:56:08 +00:00
2022-04-07 13:26:36 +00:00
## Slots
- **#error**: Specify a fallback content to display in case of error.
```vue
< template >
< NuxtErrorBoundary >
<!-- ... -->
< template #error ="{ error }" >
< p > An error occured: {{ error }}< / p >
< / template >
< / NuxtErrorBoundary >
< / template >
```
::ReadMore{link="/guide/features/error-handling"}
2022-04-06 05:56:08 +00:00
::