You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having some trouble with some error handling on a couple of websites i run, so I setup a clean nuxt app (3.13.0) to test.
My test is very simple, only nuxt, vue and vue-router as deps.
app.vue uses <NuxtPage /> error.vue takes in an error prop layouts/default.vue uses <slot /> pages/index.vue and pages/about.vue use <NuxtLayout/> to wrap the contents.
When I go to some other page, I can see my error is handled in that i am shown the error page contents, however Nuxt continues with loading everything, and vue-router outputs 5-6 warnings about the route not being found.
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
WARN [Vue Router warn]: No match found for location with path "/asdfhasduf"
I am confused, if the error is being handled in error.vue, why is there a need for vue-router to even load and complain (6 times no less)?
I may be wrong, but i suspect this is the very reason i am having fairly serious memory spikes on 2 production websites, where bots typically try and find typical routes on websites (weirdly mostly wordpress-related routes lol).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Nuxt community!
I am having some trouble with some error handling on a couple of websites i run, so I setup a clean nuxt app (3.13.0) to test.
My test is very simple, only nuxt, vue and vue-router as deps.
app.vue
uses<NuxtPage />
error.vue
takes in anerror
proplayouts/default.vue
uses<slot />
pages/index.vue
andpages/about.vue
use<NuxtLayout/>
to wrap the contents.When I go to some other page, I can see my error is handled in that i am shown the error page contents, however Nuxt continues with loading everything, and vue-router outputs 5-6 warnings about the route not being found.
I am confused, if the error is being handled in
error.vue
, why is there a need for vue-router to even load and complain (6 times no less)?I may be wrong, but i suspect this is the very reason i am having fairly serious memory spikes on 2 production websites, where bots typically try and find typical routes on websites (weirdly mostly wordpress-related routes lol).
Really appreciate any insight - thank you.
Beta Was this translation helpful? Give feedback.
All reactions