Skip to content

NotFound in dynamic grouped does not work at all #5498

@xKesvaL

Description

@xKesvaL

Which project does this relate to?

Router

Describe the bug

When throwing a notFound() error in a dynamic grouped layout, the notFound errors ends up going to the __root route even though you threw it from higher up.

Even though it's the default, I made sure router is in notFoundMode: "fuzzy"

Your Example Website or App

https://stackblitz.com/edit/github-3jdwo6hv-vgcgxqjm?file=src%2Froutes%2F_authed%2F%24organizationSlug%2F(orglayout)%2Froute.tsx

Steps to Reproduce the Bug or Issue

  1. Go to something like /aaa in the url.
  2. Observe behavior (shows This should not show coming from __root`)

Expected behavior

I expected that, when throwing a notFound in a certain route.tsx, that route's notFoundComponent would render. Or, at least, the route below (dynamic route $organizationSlug in that case), if it does not make sense to throw in a grouped layout.

Screenshots or Videos

No response

Platform

  • Router / Start Version: 1.132.47
  • OS: Windows
  • Browser: Chrome & Firefox
  • Browser Version: Does not matter
  • Bundler: Vite
  • Bundler Version: 7.1.7

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions