Diagnostics: improve error surfacing and busy state handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user