+19
−2
Loading
- ui.js: nuovo helper extractErrorMessage(response, fallback) --
legge il body JSON di una Response fallita, unisce un .error array
o stringifica uno scalare, fallback se assente.
- Unificati i 5 punti che estraevano l'errore ciascuno a modo suo:
actions.js (.btn-universal e select-universal), guider-panel.js
(postGuider), control.js (postExpose), sequencer.js (saveOB).
- Bug trovato unificando postExpose: l'idioma originale
(Array.isArray(data?.error) ? data.error.join(', ') : res.status)
scartava silenziosamente un errore-stringa dal server mostrando solo
lo status HTTP -- extractErrorMessage gestisce entrambi i casi.
- webcam.js: i due handler non controllavano affatto res.ok (fire and
forget) e mostravano solo console.error, mai showToast -- aggiunto
il check .ok + extractErrorMessage + showToast su fallimento in
entrambi, ora coerenti con tutti gli altri handler.
- Verificato con node --check su tutti i file toccati.
- PLAN.md aggiornato.
Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com>