### Environment ------------------------------ - Operating System: `Linux` - Node Version: `v17.9.0` - Nuxt Version: `3.0.0-rc.4` - Package Manager: `npm@8.5.5` - Builder: `vite` - User Config: `modules`, `runtimeConfig`, `autoImports` - Runtime Modules: `@nuxtjs/tailwindcss@5.1.3` - Build Modules: `-` ------------------------------ ### Reproduction **Visit the `/secret` page to see the error:** https://stackblitz.com/edit/nuxt-starter-elpq43?file=middleware%2Fauth.ts ### Describe the bug I'm trying to write an async middleware. However, when catching the rejected promise an error is thrown by nuxt when using `navigateTo()`: ```ts async function fetchUser() { throw new Error(); } export default defineNuxtRouteMiddleware(async (to, from) => { let user; try { user = await fetchUser(); } catch (e) { user = null; } if (!user) return navigateTo('/'); }); ``` ### Additional context _No response_ ### Logs _No response_