A handler can answer with an error response directly, or throw. throw new HTTPException(404, { message: 'Missing' }) from hono/http-exception ends the request with that status and the message as text. Throwing is handy deep inside helper functions, where returning a response is awkward.
Anything else that is thrown, including a rejected await, reaches app.onError((err, c) => ...). That hook decides what the client sees: hand an HTTPException its own response with err.getResponse(), and turn an unexpected failure into a stable error such as 503 without leaking the internal message. app.notFound((c) => ...) replaces the default 404 Not Found text for paths with no route.
An unhandled failure must still produce a response. Check both paths in each task: the ordinary success and the failure the contract names.
Expected errors keep their status; unexpected ones become a 503 without the internal message.