[PR #5572] [MERGED] docs: properly use await next() in hono middleware #6093

Closed
opened 2026-03-13 12:47:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5572
Author: @vincentfretin
Created: 10/25/2025
Status: Merged
Merged: 10/25/2025
Merged by: @Bekacru

Base: canaryHead: patch-2


📝 Commits (1)

  • 866f57e Properly use await next() in hono middleware

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 docs/content/docs/integrations/hono.mdx (+3 -2)

📄 Description

From documentation https://hono.dev/docs/guides/middleware
Middleware - should return nothing, will be proceeded to next middleware with await next()


Summary by cubic

Updated Hono middleware docs to use await next() and then return, instead of return next(). This aligns the example with Hono’s middleware contract and avoids incorrect async flow.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5572 **Author:** [@vincentfretin](https://github.com/vincentfretin) **Created:** 10/25/2025 **Status:** ✅ Merged **Merged:** 10/25/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `patch-2` --- ### 📝 Commits (1) - [`866f57e`](https://github.com/better-auth/better-auth/commit/866f57e345a49144e2b20b601db4162804426a93) Properly use await next() in hono middleware ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/integrations/hono.mdx` (+3 -2) </details> ### 📄 Description From documentation https://hono.dev/docs/guides/middleware Middleware - should return nothing, will be proceeded to next middleware with await next() <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Updated Hono middleware docs to use await next() and then return, instead of return next(). This aligns the example with Hono’s middleware contract and avoids incorrect async flow. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:47:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6093