v3.2.1
·
8 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Patch Changes
-
#325
c182e59Thanks @G4brym! - ExportOrderByDirectiontype alias ("asc" | "desc") so consumers can import it directly instead of inlining literal unions -
#325
c182e59Thanks @G4brym! - AddpassthroughErrorsoption to bypass chanfana's error handling and let errors propagate raw to the framework's error handlerimport { Hono } from "hono"; import { fromHono, ApiException } from "chanfana"; import { ZodError } from "zod"; const app = new Hono(); app.onError((err, c) => { // Errors arrive as raw exceptions — no HTTPException wrapping if (err instanceof ApiException) { return c.json( { ok: false, code: err.code, message: err.message }, err.status as any ); } if (err instanceof ZodError) { return c.json({ ok: false, validationErrors: err.issues }, 400); } return c.json({ ok: false, message: "Internal Server Error" }, 500); }); const openapi = fromHono(app, { passthroughErrors: true });