Skip to content

Merge pages/api/utils into utils #158

@alexashley

Description

@alexashley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions