Report Error on status page if content page returns error

This commit is contained in:
Josh Holtrop 2026-04-01 20:55:55 -04:00
parent 51aa0c805e
commit 7c907fe0ce

View File

@ -164,9 +164,13 @@
fetch("?content", { credentials: "same-origin" }) fetch("?content", { credentials: "same-origin" })
.then(function(response) { .then(function(response) {
if (response.ok) return response.text(); if (response.ok) return response.text();
throw new Error();
}) })
.then(function(html) { .then(function(html) {
if (html) document.getElementById("content").innerHTML = html; document.getElementById("content").innerHTML = html;
})
.catch(function() {
document.getElementById("content").innerHTML = "Error";
}); });
</script> </script>
<% end %> <% end %>