-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Which project does this relate to?
Router
Describe the bug
If an error is thrown in the head
function of a route, when the router hydrates, the exception is not caught and therefore the notFoundComponent
is not rendered.
On the server, the notFoundComponent
is rendered as expected.
Adding a catch here, results in the notFoundComponent
being rendered.
May you please help look into this for us?
Thanks
Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
- throw
notFound()
from ahead
function on a route - Go to the url handled by the route
- Page crashes with:
{
"data": {
"data": {
"isNotFound": true
}
},
"__isServerError": true
}
Expected behavior
As a user, if I navigate to a page that doesn't exist, I can see a not found page, whether viewing on the server or client
Screenshots or Videos
No response
Platform
- Router / Start Version: v1.132.27
- OS: macOS
- Browser: Chrome
- Browser Version: Version 140.0.7339.208 (Official Build)
- Bundler: vite
- Bundler Version: 7.1.2
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels