Dashboard: auto-retry the digest detail once and surface the error text
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -350,13 +350,21 @@ async function main(): Promise<void> {
|
|||||||
renderList(summaries, selected, (w) => void select(w));
|
renderList(summaries, selected, (w) => void select(w));
|
||||||
try {
|
try {
|
||||||
await showDigest(week);
|
await showDigest(week);
|
||||||
|
return;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// 서버 재기동 순간 등 일시 실패: 본문만 안내로 대체하고 목록/차트는 살려둔다
|
console.error(err); // 서버 재기동 순간 등 일시 실패일 수 있으니 한 번 자동 재시도
|
||||||
|
}
|
||||||
|
await new Promise((r) => setTimeout(r, 1500));
|
||||||
|
try {
|
||||||
|
await showDigest(week);
|
||||||
|
} catch (err) {
|
||||||
|
// 재시도도 실패: 본문만 안내로 대체하고 목록/차트는 살려둔다
|
||||||
console.error(err);
|
console.error(err);
|
||||||
const body = byId<HTMLElement>("digest-body");
|
const body = byId<HTMLElement>("digest-body");
|
||||||
body.textContent = "";
|
body.textContent = "";
|
||||||
body.append(
|
body.append(
|
||||||
el("p", "chart-empty", `${week} 다이제스트를 불러오지 못했습니다 — 새로고침하거나 다시 선택해 주세요.`),
|
el("p", "chart-empty", `${week} 다이제스트를 불러오지 못했습니다 — 새로고침하거나 다시 선택해 주세요.`),
|
||||||
|
el("p", "chart-empty", `오류: ${err instanceof Error ? err.message : String(err)}`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user