Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pages/api/utils into utils #158

Open
alexashley opened this issue Jul 9, 2021 · 0 comments
Open

Merge pages/api/utils into utils #158

alexashley opened this issue Jul 9, 2021 · 0 comments

Comments

@alexashley
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant