From d7a17eb05421abc9f94b63effb5be5b5fd963ee8 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Mon, 22 Jun 2026 01:10:40 -0700 Subject: [PATCH] fix: show extract API errors in UI instead of false 'Extraction complete' doExtract() only checked data.message, so JSON responses with error key (e.g. 'no ISO files found') would show green success. Now checks data.error first and displays it in red. --- web/ui/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/ui/app.js b/web/ui/app.js index 9a4cac1..6d3ed62 100644 --- a/web/ui/app.js +++ b/web/ui/app.js @@ -175,6 +175,11 @@ async function doExtract() { try { const resp = await fetch(`${API}/extract?dir=${encodeURIComponent(isoDir)}&out=${encodeURIComponent(wavDir)}`); const data = await resp.json(); + if (data.error) { + status.textContent = data.error; + status.style.color = 'var(--accent)'; + return; + } status.textContent = data.message || 'Extraction complete'; status.style.color = 'var(--green)'; } catch (e) {