From 98fbe1b96edf891ff2c8c89544f4f5e237a42115 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sat, 13 Dec 2025 12:10:50 -0500 Subject: [PATCH] Diagnostics: improve error surfacing and busy state handling --- pikit-web/assets/diaglog.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pikit-web/assets/diaglog.js b/pikit-web/assets/diaglog.js index d82477c..c10da86 100644 --- a/pikit-web/assets/diaglog.js +++ b/pikit-web/assets/diaglog.js @@ -107,8 +107,8 @@ export async function initDiagUI({ elements, toast }) { const entries = await syncState(); render(entries); toast?.("Diagnostics refreshed (after retry)", "success"); - } catch { - // swallow + } catch (err2) { + toast?.(err2.error || "Diagnostics still failing", "error"); } } finally { setBusy(false); @@ -126,6 +126,8 @@ export async function initDiagUI({ elements, toast }) { } catch (e) { toast?.(e.error || "Failed to save diagnostics setting", "error"); enableToggle.checked = !enableToggle.checked; + setBusy(false); + return; } finally { setBusy(false); }