Report Error on status page if content page returns error
This commit is contained in:
parent
51aa0c805e
commit
7c907fe0ce
@ -164,9 +164,13 @@
|
||||
fetch("?content", { credentials: "same-origin" })
|
||||
.then(function(response) {
|
||||
if (response.ok) return response.text();
|
||||
throw new Error();
|
||||
})
|
||||
.then(function(html) {
|
||||
if (html) document.getElementById("content").innerHTML = html;
|
||||
document.getElementById("content").innerHTML = html;
|
||||
})
|
||||
.catch(function() {
|
||||
document.getElementById("content").innerHTML = "Error";
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user