Route loader errors stopped bubbling up to nearest error component
Describe the bug
Up until a recent-ish beta version (not sure which specifically), errors would bubble up the route tree until it hit a route with an errorComponent or the root. Now it doesn't bubble and uses some boilerplate UI unless I put the custom error component where the error actually happens.
Your Example Website or App
https://stackblitz.com/edit/github-gtqdb6
Steps to Reproduce the Bug or Issue
- open
/aboutroute
Expected behavior
The error UI div should be rendered instead of the boilerplate
Screenshots or Videos
No response
Platform
Everywhere
Additional context
No response
Error bubbling is back!
I'm still noticing the issue on v1
@tannerlinsley, thank you for taking a look. I too am still seeing this issue in 1.15.22.
can you please find out which version introduced this bug again? this would help fixing this issue.
is this still relevant?
The issue is still present in 1.19.2. When an error is thrown in a route that doesn't have an error component, the defaultErrorComponent is used instead of the nearest parent route errorComponent.
@schiller-manuel Has there been any progress?
I'm also experiencing this issue right now
I can confirm this bug has been fixed in @tanstack/[email protected]
This bug is not fix for me in @tanstack/[email protected]. I have the same behavior as my last comment instead of the one on the section Pathless / Layout Routes from the documentation :
Provide fallbacks for error components or pending elements to child routes
I can confirm this is not working in 1.33.6. I have an errorComponent set in the root route. Throwing an error in a beforeLoad handler in a pathless route does not render this error component instead I get a WSOD.