cloudflare/chanfana v3.2.1
cloudflare/chanfana
Captured source
source ↗published Feb 26, 2026seen 5dcaptured 9hhttp 200method plain
v3.2.1
Repository: cloudflare/chanfana
Tag: v3.2.1
Published: 2026-02-26T20:32:36Z
Prerelease: no
Release notes:
Patch Changes
- #325 `c182e59` Thanks @G4brym! - Export
OrderByDirectiontype alias ("asc" | "desc") so consumers can import it directly instead of inlining literal unions
- #325 `c182e59` Thanks @G4brym! - Add
passthroughErrorsoption to bypass chanfana's error handling and let errors propagate raw to the framework's error handler
import { 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 });Notability
notability 3.0/10Routine patch release by Cloudflare