mirror of
https://github.com/smittix/intercept.git
synced 2026-06-19 02:49:45 -07:00
Fix WeFax error detection and surface errors in strip UI
rtl_fm subprocess failures (missing tool, no SDR hardware) were silent — add tool-path check and post-spawn health check in _start_pipeline(), show errors prominently in the strip status bar (red text + red dot), and include error detail in scheduler skip events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -192,11 +192,15 @@ var WeFax = (function () {
|
||||
setStripFreq(freqKhz);
|
||||
connectSSE();
|
||||
} else {
|
||||
setStatus('Error: ' + (data.message || 'unknown'));
|
||||
var errMsg = data.message || 'unknown error';
|
||||
setStatus('Error: ' + errMsg);
|
||||
showStripError(errMsg);
|
||||
}
|
||||
})
|
||||
.catch(function (err) {
|
||||
setStatus('Error: ' + err.message);
|
||||
var errMsg = err.message || 'Network error';
|
||||
setStatus('Error: ' + errMsg);
|
||||
showStripError(errMsg);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -323,6 +327,7 @@ var WeFax = (function () {
|
||||
if (data.status === 'error') {
|
||||
state.running = false;
|
||||
updateButtons(false);
|
||||
showStripError(data.message || 'Decode error');
|
||||
}
|
||||
|
||||
if (data.status === 'stopped') {
|
||||
@@ -680,6 +685,16 @@ var WeFax = (function () {
|
||||
if (el) el.textContent = String(khz);
|
||||
}
|
||||
|
||||
function showStripError(msg) {
|
||||
var statusEl = document.getElementById('wefaxStripStatus');
|
||||
if (statusEl) {
|
||||
statusEl.textContent = 'Error: ' + msg;
|
||||
statusEl.style.color = '#ff4444';
|
||||
}
|
||||
var dot = document.getElementById('wefaxStripDot');
|
||||
if (dot) dot.className = 'wefax-strip-dot error';
|
||||
}
|
||||
|
||||
function flashStartError() {
|
||||
setStatus('Select a station and frequency first');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user