From 1dfcdcc2cb80fc3917b6e4eb7eaf1c1b7e0f8b46 Mon Sep 17 00:00:00 2001 From: Flea Flicker Date: Tue, 21 Apr 2026 22:19:26 +0000 Subject: [PATCH] fix(GRO-867): c.body does not accept Buffer in Hono 4.x c.body() signature only accepts string | ArrayBuffer | ReadableStream | Uint8Array in Hono 4.x, not Node.js Buffer. Return a plain Response directly instead. Co-Authored-By: Claude Opus 4.6 --- apps/api/src/routes/settings.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/api/src/routes/settings.ts b/apps/api/src/routes/settings.ts index 129e5e0..3453582 100644 --- a/apps/api/src/routes/settings.ts +++ b/apps/api/src/routes/settings.ts @@ -226,9 +226,13 @@ settingsRouter.get("/logo", async (c) => { if (!row.logoKey) return c.json({ error: "No logo on file" }, 404); const { body, contentType } = await getObject(row.logoKey); - c.header("Content-Type", contentType); - c.header("Cache-Control", "public, max-age=86400"); - return c.body(body); + return new Response(Buffer.from(body), { + status: 200, + headers: { + "Content-Type": contentType, + "Cache-Control": "public, max-age=86400", + }, + }); }); /**