Skip to content

Conversation

bgub
Copy link
Contributor

@bgub bgub commented Sep 8, 2025

I don't think this fix ever got backported to Next 15.5!

@huozhi @ijjk @ztanner

## For Contributors

### Fixing a bug

- Updates the (previously incorrect) API route handler type definition
in the validator
- Changes the return type from `Promise<Response | void> | Response |
void` to `unknown | Promise<unknown>`
- Updates the test route example to use the `NextApiHandler` type
(making sure it works)

Fixes vercel#83067
@ijjk ijjk added create-next-app Related to our CLI tool for quickly starting a new Next.js application. created-by: Next.js team PRs by the Next.js team. Font (next/font) Related to Next.js Font Optimization. tests Turbopack Related to Turbopack with Next.js. type: next labels Sep 8, 2025
@ijjk ijjk changed the base branch from canary to next-15-5 September 8, 2025 20:01
@ijjk ijjk merged commit db56d77 into vercel:next-15-5 Sep 8, 2025
5 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application. created-by: Next.js team PRs by the Next.js team. Font (next/font) Related to Next.js Font Optimization. locked tests Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants