Nuxt/docs/content/3.api/1.composables/use-error.md
Ada J 48d886c860
docs(api): document useError , useLazyAsyncData and useLazyFetch (#4341)
* 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>
2022-04-14 10:53:58 +02:00

334 B

useError

Nuxt provides a composable to catch global errors.

This function will return the global Nuxt error that is being handled.

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"} ::