Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route loader errors stopped bubbling up to nearest error component #724

Closed
geoff-harper opened this issue Sep 11, 2023 · 11 comments · Fixed by #1355
Closed

Route loader errors stopped bubbling up to nearest error component #724

geoff-harper opened this issue Sep 11, 2023 · 11 comments · Fixed by #1355

Comments

@geoff-harper
Copy link

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

  1. open /about route

Expected behavior

The error UI div should be rendered instead of the boilerplate

Screenshots or Videos

No response

Platform

Everywhere

Additional context

No response

@tannerlinsley
Copy link
Collaborator

Error bubbling is back!

@geoff-harper
Copy link
Author

I'm still noticing the issue on v1

@zavarka
Copy link

zavarka commented Feb 8, 2024

@tannerlinsley, thank you for taking a look. I too am still seeing this issue in 1.15.22.

@schiller-manuel
Copy link
Contributor

can you please find out which version introduced this bug again? this would help fixing this issue.

@schiller-manuel
Copy link
Contributor

is this still relevant?

@GuillaumeLaroucheUQAT
Copy link

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.

@Zebeqo
Copy link

Zebeqo commented Mar 13, 2024

@schiller-manuel Has there been any progress?

@tien
Copy link

tien commented Mar 20, 2024

I'm also experiencing this issue right now

@ahkohd
Copy link

ahkohd commented Mar 25, 2024

I can confirm this bug has been fixed in @tanstack/react-router@1.22.3

@GuillaumeLaroucheUQAT
Copy link

This bug is not fix for me in @tanstack/react-router@1.26.13. 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

@felipelube
Copy link

felipelube commented May 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants