Link to the code that reproduces this issue
https://github.com/alexismendez11/ecommerce-demo
To Reproduce
- Navigate to https://v0-ecommerce-next-js-app.vercel.app/menu
- Go to a non existent category page (ex. https://v0-ecommerce-next-js-app.vercel.app/menu/category/test)
- You will see the page crash with the message
Current vs. Expected behavior
current: the site crashed. and you will see this message "Application Error"
expected: see the content of the defined NotFound page
Provide environment information
Next.js: 16.x (also reproducible on latest canary)
React: 19.x
Router: App Router
Node.js: 22.x
Package manager: pnpm
OS: macOS
(also reproducible on other team machines)
Browser: Chrome 145.x
Architecture: Dynamic route (/menu/category/[slug])
Data layer: External CMS (Prismic), but issue appears framework-level
Which area(s) are affected? (Select all that apply)
Error Handling, Use Cache, cacheComponents, Dynamic Routes
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local), Vercel (Deployed)
Additional context
No response
Link to the code that reproduces this issue
https://github.com/alexismendez11/ecommerce-demo
To Reproduce
Current vs. Expected behavior
current: the site crashed. and you will see this message "Application Error"
expected: see the content of the defined NotFound page
Provide environment information
Which area(s) are affected? (Select all that apply)
Error Handling, Use Cache, cacheComponents, Dynamic Routes
Which stage(s) are affected? (Select all that apply)
next build (local), next start (local), Vercel (Deployed)
Additional context
No response