Dashboard: keep list/chart alive when the digest detail fetch fails

A transient failure (e.g. container swap during redeploy) used to leave the
body panel silently empty; show a retry hint in the body instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jsahn
2026-09-02 19:52:33 +09:00
co-authored by Claude Fable 5
parent d9dda79282
commit 953ea852b8
+11 -1
View File
@@ -348,7 +348,17 @@ async function main(): Promise<void> {
const select = async (week: string) => {
selected = week;
renderList(summaries, selected, (w) => void select(w));
await showDigest(week);
try {
await showDigest(week);
} catch (err) {
// 서버 재기동 순간 등 일시 실패: 본문만 안내로 대체하고 목록/차트는 살려둔다
console.error(err);
const body = byId<HTMLElement>("digest-body");
body.textContent = "";
body.append(
el("p", "chart-empty", `${week} 다이제스트를 불러오지 못했습니다 — 새로고침하거나 다시 선택해 주세요.`),
);
}
};
await select(selected);
}