mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
48d886c860
* docs: add documents for use-error,use-lazy-async-data and use-lazy-fetch * docs(API): document useError,useLazyAsyncData and useLazyFetch Co-authored-by: xiaojie.jiang <xiaojie.jiang@dhc.com.cn>
15 lines
334 B
Markdown
15 lines
334 B
Markdown
# `useError`
|
|
|
|
Nuxt provides a composable to catch global errors.
|
|
|
|
This function will return the global Nuxt error that is being handled.
|
|
|
|
```ts
|
|
const error = useError()
|
|
```
|
|
|
|
`useError` set an error in state, create a reactive and SSR-friendly global Nuxt error across components.
|
|
|
|
::ReadMore{link="/guide/features/error-handling"}
|
|
::
|