I have a route handler, which is defined under app/api/[id]/route.ts. This folder does not have a layout.ts nor a page.ts, it is only a route handler. When building for production, after collection page information occurs, a build error is thrown for this path. This route only contains a single GET method, which relies on the dynamic id parameter
The error is coming from a data validation, where we throw an error if the id param is invalid. Why is Next attempting to statically build my dynamic route handler?