mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
3ec108493d
* docs: simplify docs to only markdown * Create nuxt-config.md * chore: update * chore: add readme
741 B
741 B
title | description |
---|---|
clearError | The clearError composable clears all handled errors. |
clearError
Within your pages, components, and plugins, you can use clearError
to clear all errors and redirect the user.
Parameters:
options?: { redirect?: string }
You can provide an optional path to redirect to (for example, if you want to navigate to a 'safe' page).
// Without redirect
clearError()
// With redirect
clearError({ redirect: '/homepage' })
Errors are set in state using useError()
. The clearError
composable will reset this state and calls the app:error:cleared
hook with the provided options.
::ReadMore{link="/docs/getting-started/error-handling"} ::