The DEV-only error check: an outer middleware that logs every JSON error
response its route doesn't declare.
Mounted outermost by create_app_server, so it sees what every layer
answers — a middleware's refusal (the body limit, the origin check, the
auth guards) as much as a handler's or the error catch's. After the request
it finds the route the request reached (create_route_lookup: Hono's own
router over the route specs in mount order, HEAD read as GET) and checks the
response against that route's error map (check_route_error): an error
status the map lacks, or a body off the status's schema, is logged. A 500
internal_error and a 503 service_unavailable are always accepted, a
JSON-RPC error envelope on a jsonrpc route is not a REST error body, a
non-JSON response is skipped, and so is a request no route spec matches:
the unmatched-route handler's 405 and 404 (server/unmatched_route.ts)
answer for no route, so no route's map can hold them.
Logs, never throws — a throw inside it, its logger's included, is swallowed
— and leaves the response unchanged. Outside DEV
create_dev_route_error_check returns null and nothing is mounted.