Skip to content

fix(vercel): fix handle() return type for Next.js 15 App router#4881

Closed
mddanishh18 wants to merge 2 commits intohonojs:mainfrom
mddanishh18:main
Closed

fix(vercel): fix handle() return type for Next.js 15 App router#4881
mddanishh18 wants to merge 2 commits intohonojs:mainfrom
mddanishh18:main

Conversation

@mddanishh18
Copy link
Copy Markdown

Fixes #4877

What this PR does:
Updates the return type of the Vercel handle() function to include void (and Promise<Response | void>). This is required because Next.js 15 App Router expects route handlers to optionally return void.

mddanishh18 and others added 2 commits April 14, 2026 17:12
…s 15 App Router route handler types

Automated by AI Dev Crew
fix: `hono/vercel` `handle()` return type is incompatible with Next.js 15 App Router route handler types
@yusukebe
Copy link
Copy Markdown
Member

Hi @mddanishh18

Thank you for the PR. Does this mean there is a possibility app.fetch(req) returns void?

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.89%. Comparing base (1aa32fb) to head (989b298).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4881   +/-   ##
=======================================
  Coverage   92.89%   92.89%           
=======================================
  Files         177      177           
  Lines       11797    11797           
  Branches     3515     3514    -1     
=======================================
  Hits        10959    10959           
  Misses        837      837           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mddanishh18 mddanishh18 closed this by deleting the head repository Apr 15, 2026
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

Successfully merging this pull request may close these issues.

hono/vercel handle() return type is incompatible with Next.js 15 App Router route handler types

2 participants