Report Error on status page if content page returns error
This commit is contained in:
1 parent
51aa0c805e
commit
7c907fe0ce
1 file changed
+5
-1
+5
-1
@@ -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 %>
|
||||
|
||||
Reference in new issue
Block a user