Nuxt/examples/app/error-handling/middleware/error.global.ts
Daniel Roe 78618f1f21
feat(nuxt): improve error dx for users (#4539)
Co-authored-by: Pooya Parsa <pooya@pi0.io>
2022-07-21 16:29:03 +02:00

6 lines
136 B
TypeScript

export default defineNuxtRouteMiddleware((to) => {
if ('middleware' in to.query) {
return showError('error in middleware')
}
})