TanStackT
TanStack8mo ago
30 replies
slow-yellow

NotFound Error bubbling

I'm finding it really confusing trying to get the error behaviour I'd like. I'd essentially like a unmatched route to fall back to its closest error handler. Most of the time I want to use the base 404 error page like notFoundMode: 'root' provides. However I'd like to for certain routes handle not found differently. Say someone went to /posts/5 I want to be able to specify an error page on the /posts and have it handle the error in its outlet. For all other outlets though, unless specified it should fall back to the main error handler.

I've no idea where I'm going wrong, I feel like I've tried just about everything but I guess I'm not understanding how error handling works.
Was this page helpful?