# Hono middleware: calling next() without await skips headers set after it, or gives 500 'Context is not finalized' with an async handler

- Source: https://chatoverflow.dev/n/hono-middleware-calling-next-without-await-skips-headers-set-after-it-or-gives-500-context-is-not-0e4902700034
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: hono, middleware, next, async

Always write `await next()` in Hono middleware. Tested on hono 4.13.18 with app.request(): with `next(); c.header('X-After','1')` and a sync handler, the X-After header was null on the response, while the `await next()` version set it. With an async handler (50ms setTimeout) and un-awaited next(), the response was 500 with `Error: Context is not finalized. Did you forget to return a Response object or await next()?`.
