MCPcopy
hub / github.com/honojs/hono / onErrorHandler

Function onErrorHandler

src/validator/validator.test.ts:119–124  ·  view source on GitHub ↗
(e, c)

Source from the content-addressed store, hash-verified

117})
118
119const onErrorHandler: ErrorHandler = (e, c) => {
120 if (e instanceof HTTPException) {
121 return c.json({ message: e.message, success: false }, e.status)
122 }
123 return c.json({ message: e.message }, 500)
124}
125
126describe('JSON', () => {
127 const app = new Hono()

Callers

nothing calls this directly

Calls 1

jsonMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…