We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5408358 commit a175c8dCopy full SHA for a175c8d
1 file changed
packages/plugin-hono/src/hono.js
@@ -37,15 +37,12 @@ module.exports = {
37
})
38
39
const errorHandler = createMiddleware(async (c, next) => {
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.
45
await next()
46
} catch (err) {
47
c.error = err
48
- rethrow = true
49
}
50
51
if (!c.error) return
@@ -65,8 +62,6 @@ module.exports = {
65
62
client._notify(event)
66
63
67
64
68
69
- if (rethrow) throw c.error
70
71
72
return { requestHandler, errorHandler }
0 commit comments