We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dacde8 commit 2d13751Copy full SHA for 2d13751
1 file changed
packages/plugin-hono/src/hono.js
@@ -40,8 +40,8 @@ module.exports = {
40
let rethrow = false
41
42
try {
43
- // Catch non-errors thrown in routes without causing the route to hang by awaiting the next() call inside a try/catch block.
44
- // The error is then attached to the context and processed in the same way as errors thrown in routes.
+ // Catch all thrown values from routes by awaiting next() inside a try/catch block.
+ // This also ensures non-Error throws are attached to the context and processed without causing the route to hang.
45
await next()
46
} catch (err) {
47
c.error = err
0 commit comments