nuxt / nuxt

The Intuitive Vue Framework.
https://nuxt.com
MIT License
54.74k stars 5.01k forks source link

When the route does not match, the data property in useError() is a string, not an object. #29746

Open chenx130 opened 2 hours ago

chenx130 commented 2 hours ago

Environment


Reproduction

https://stackblitz.com/edit/github-dcaplg?file=error.vue

Describe the bug

Access a non-existent page, then capture the error in error.vue, where the data in the error is a string, why isn't it an object?

Additional context

No response

Logs

WARN [Vue Router warn]: No match found for location with path "/xxxx" WARN [Vue Router warn]: No match found for location with path "/xxxx" WARN [Vue Router warn]: No match found for location with path "/xxxx" Not found: {"path":"/xxxx"}(string) WARN [Vue Router warn]: No match found for location with path "/xxxx"

stackblitz[bot] commented 2 hours ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.