Next.js version: 14.2.3
Next.js Runtime version: 5.6.0
I have a folder at app/[[...path]]
that is using optional catch-all segments and my goal is to serve a 404 when a page outside of generateStaticParams
is accessed.
Per the Next.js documentation, I am setting the dynamicParams
option to false
in order to achieve this: File Conventions: Route Segment Config | Next.js
When running the site locally, I can visit a page such as /this-does-not-exist
and see the 404 template. After deploying to Netlify, the same page shows an error: " Application error: a server-side exception has occurred (see the server logs for more information)."
From what I can tell, it looks like the error thrown by the notFound()
function is uncaught instead of triggering the 404 page. Should the Next.js Runtime be able to support this feature?