nuxt / nuxt

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

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

Open chenx130 opened 4 weeks ago

chenx130 commented 4 weeks 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 4 weeks ago

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