Repository navigation
fix(nuxt): Skip 3xx/4xx Nuxt errors in the vue:error hook - #25341
Merged
Merged
Conversation
mketiku
requested review from
nicohrubec and
s1gr1d
and removed request for
a team
October 13, 2026 22:12
s1gr1d
approved these changes
Oct 14, 2026
s1gr1d
left a comment
Member
There was a problem hiding this comment.
Thanks for your contribution!
The PR title reads as "300 to 400", but the check skips 300 to 499. Suggestion: fix(nuxt): Skip 3xx/4xx Nuxt errors in the vue:error hook.
Just some small nit comments
Contributor
Author
|
Thanks! I updated the title and addressed both nits in 1b3602c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Description
#15473 stopped the client plugin from reporting Nuxt errors with a 3xx/4xx status in its
app:errorhook. Nuxt also callsvue:errorfor every error that reaches the root component, fatal or not, so a page that throwscreateError({ statusCode: 404 })during setup is still reported, from thevue:errorhandler (mechanismauto.function.nuxt.vue-error). On client-side navigation this happens for every such 404.This applies the same check to both hooks through a shared
isIgnoredNuxtError, and adds unit tests for the client plugin's error hooks: 3xx/4xx Nuxt errors are skipped from both hooks, 5xx Nuxt errors and non-Nuxt errors are still reported. Without the fix, thevue:error4xx test fails.