ReleaseCloudflare (Workers AI)Cloudflare (Workers AI)published Feb 26, 2026seen 5d

cloudflare/chanfana v3.2.1

cloudflare/chanfana

Open original ↗

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 OrderByDirection type alias ("asc" | "desc") so consumers can import it directly instead of inlining literal unions
  • #325 `c182e59` Thanks @G4brym! - Add passthroughErrors option 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/10

Routine patch release by Cloudflare