From 04728ce5186dfb4b41cdfe12dbf9cd6a4ba084cc Mon Sep 17 00:00:00 2001 From: hayzam Date: Sun, 29 Mar 2026 09:36:26 +0530 Subject: [PATCH] ui: init: fix reboot check --- web/src/lib/components/custom/Initialization/Reboot.svelte | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/src/lib/components/custom/Initialization/Reboot.svelte b/web/src/lib/components/custom/Initialization/Reboot.svelte index 499c915a..60049e88 100644 --- a/web/src/lib/components/custom/Initialization/Reboot.svelte +++ b/web/src/lib/components/custom/Initialization/Reboot.svelte @@ -15,6 +15,10 @@ try { const health = await getBasicHealth(); + if (!health || ('status' in health && health.status === 'error')) { + throw new Error('System is down'); + } + if (!wentDown) { // still up → wait for it to go down await new Promise((r) => setTimeout(r, intervalMs));