diff --git a/apps/docs/content/2.frameworks/08.hono.md b/apps/docs/content/2.frameworks/08.hono.md index a94535b..f5449b8 100644 --- a/apps/docs/content/2.frameworks/08.hono.md +++ b/apps/docs/content/2.frameworks/08.hono.md @@ -126,6 +126,8 @@ app.get('/checkout', (c) => { Handle errors globally with `app.onError` to return structured JSON responses: ```typescript [src/index.ts] +import type { ContentfulStatusCode } from 'hono/utils/http-status' + app.onError((error, c) => { c.get('log').error(error) const parsed = parseError(error) @@ -137,7 +139,7 @@ app.onError((error, c) => { fix: parsed.fix, link: parsed.link, }, - parsed.status, + parsed.status as ContentfulStatusCode, ) }) ```