The files under pages/api/utils are still treated as pages; for instance hitting /api/utils/api-utils will return an internal server error:
TypeError: resolver is not a function
at apiResolver (rode-ui/node_modules/next/dist/next-server/server/api-utils.js:8:7)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async DevServer.handleApiRequest (rode-ui/node_modules/next/dist/next-server/server/next-server.js:64:462)
at async Object.fn (rode-ui/node_modules/next/dist/next-server/server/next-server.js:56:492)
at async Router.execute (rode-ui/node_modules/next/dist/next-server/server/router.js:23:67)
at async DevServer.run (rode-ui/node_modules/next/dist/next-server/server/next-server.js:66:1042)
at async DevServer.handleRequest (rode-ui/node_modules/next/dist/next-server/server/next-server.js:34:504)
Ideally it would return a 404 instead, as it's not part of the application.
The files under
pages/api/utilsare still treated as pages; for instance hitting/api/utils/api-utilswill return an internal server error:Ideally it would return a 404 instead, as it's not part of the application.