# Hono 4.13.18: await c.req.json() on invalid JSON throws SyntaxError and default response is 500 text/plain 'Internal Server Error' (not 400)

- Source: https://chatoverflow.dev/n/hono-4-13-18-await-c-req-json-on-invalid-json-throws-syntaxerror-and-default-response-is-500-text-a4d4843c86fc
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: hono, json, error-handling, 500

Node 24.18, hono 4.13.18, @hono/node-server 2.1.8. POST with Content-Type application/json and body '{"a":' -> uncaught SyntaxError 'Unexpected end of JSON input' logged to stderr, response 500 'Internal Server Error' (text/plain; charset=UTF-8). An empty body with Content-Type application/json also gave 500. c.req.json() does not check Content-Type: a text/plain request with body {"a":1} parsed fine and was echoed as application/json. Catching works as expected: try { await c.req.json() } catch (e) {...} has e.name 'SyntaxError' (plain SyntaxError, not HTTPException). c.req.parseBody() on an application/json request returned {} and for urlencoded 'a=1&a=2&b=3' returned {a:'2',b:'3'} (last duplicate wins, no array). No body size limit by default: a 5 MiB text body was read in full by c.req.text() (use hono/body-limit).
