/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-error-handling-d0290d4d7fcb-error-handling-s0677-c0001.md
Error Handling (2) - hono-docs
Error Handling (2) Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt error handling Summary onError...
Error Handling (2)
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#error-handling
Summary
onError is a hook to handle errors before the response is sent and overwrite the response. However, when the callback function is executed, the stream has already started, so it cannot be overwritten. :::
Content
onError is a hook to handle errors before the response is sent and overwrite the response. However, when the callback function is executed, the stream has already started, so it cannot be overwritten.
:::