From 8b8badb3822c31c643e6de10804ffc6ae7cd712c Mon Sep 17 00:00:00 2001 From: Lichen Dev Agent Date: Sun, 23 Aug 2026 00:31:47 +0000 Subject: [PATCH] Log 5xx AppErrors + content-type on error responses (diagnose save failure) --- src/server/app.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/server/app.ts b/src/server/app.ts index 1f679f7..e7bc812 100644 --- a/src/server/app.ts +++ b/src/server/app.ts @@ -85,9 +85,15 @@ export function buildApp() { }, }); } + if (error.statusCode >= 500) { + console.error("AppError(" + error.statusCode + "):", error); + } return new Response(error.message, { status: error.statusCode, - headers: { "cache-control": PRIVATE_CACHE }, + headers: { + "cache-control": PRIVATE_CACHE, + "content-type": "text/plain; charset=utf-8", + }, }); } if (code === "NOT_FOUND") { -- 2.51.2