Replies: 1 comment
-
I think I may have found the answer in middleware documentation. WIll revisit if that blows up on me ;) sorry bout that: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am building a react router 7 app trying to get this to work: https://reactrouter.com/how-to/error-boundary#4-nested-error-boundaries. Im using a flat route setup utilizing folder names to define my routes. I am also using the middleware feature.
Basic setup:
root.tsx
brand.$brandName/route.tsx
brand.$brandName.protected/route.tsx
What I would expect is that the errors thrown by my protected routes middleware (Im not authorized etc) would end up caught by my "branded" error boundary. However it only ever renders the root boundary. I find if i throw directly from the branded / protected
loader
not the middleware I do get the "nearest" boundary. Is this a miss in the middleware feature? Am I missing something about using it?Beta Was this translation helpful? Give feedback.
All reactions