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:
@@ -348,7 +348,17 @@ async function main(): Promise<void> {
|
|||||||
const select = async (week: string) => {
|
const select = async (week: string) => {
|
||||||
selected = week;
|
selected = week;
|
||||||
renderList(summaries, selected, (w) => void select(w));
|
renderList(summaries, selected, (w) => void select(w));
|
||||||
|
try {
|
||||||
await showDigest(week);
|
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);
|
await select(selected);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user