Skip to content

Commit a175c8d

Browse files
committed
test: drop the rethrow
1 parent 5408358 commit a175c8d

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

packages/plugin-hono/src/hono.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,12 @@ module.exports = {
3737
})
3838

3939
const errorHandler = createMiddleware(async (c, next) => {
40-
let rethrow = false
41-
4240
try {
4341
// Catch non-errors thrown in routes without causing the route to hang by awaiting the next() call inside a try/catch block.
4442
// The error is then attached to the context and processed in the same way as errors thrown in routes.
4543
await next()
4644
} catch (err) {
4745
c.error = err
48-
rethrow = true
4946
}
5047

5148
if (!c.error) return
@@ -65,8 +62,6 @@ module.exports = {
6562
client._notify(event)
6663
}
6764
}
68-
69-
if (rethrow) throw c.error
7065
})
7166

7267
return { requestHandler, errorHandler }

0 commit comments

Comments
 (0)