diff --git a/app/sovran_systemsos_web/static/js/features.js b/app/sovran_systemsos_web/static/js/features.js index e0fda1f..fee6ede 100644 --- a/app/sovran_systemsos_web/static/js/features.js +++ b/app/sovran_systemsos_web/static/js/features.js @@ -384,7 +384,10 @@ function handleFeatureToggle(feat, newEnabled) { headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ports: ports }), }) - .then(function(r) { return r.json(); }) + .then(function(r) { + if (!r.ok) throw new Error("Port status request failed: " + r.status); + return r.json(); + }) .then(function(data) { var portStatuses = {}; (data.ports || []).forEach(function(p) {