description
When using hono/body-limit middleware with @hono/node-server, large requests that exceed the body limit receive ERR_CONNECTION_RESET instead of error response.
environment
- hono": "^4.12.8"
- @hono/node-server": "^1.19.11"
- node: 24.13.0
reproduce
- Create hono project with quick-start
- Add body-limit as usage example
- Post request to
/upload with body size much larger than 50kb
or I have created reproduce repo
Note: This does not occur with small payloads slightly over the limit (e.g. 51KB). It reliably occurs with larger payloads (e.g. 1MB+). I believe this is because the client is still actively sending the request body when the server responds and closes the connection — smaller payloads finish transmitting before the socket is destroyed.