about summary refs log tree commit diff stats
path: root/frontend/static
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/static')
-rw-r--r--frontend/static/search.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/static/search.js b/frontend/static/search.js
index 030a318..d9993e4 100644
--- a/frontend/static/search.js
+++ b/frontend/static/search.js
@@ -80,7 +80,8 @@ async function getResults(url) {
       },
     });
 
-    if (res.ok) {
+    // render errors sent as HTML as well as OK responses
+    if (res.headers.get("content-type").startsWith("text/html")) {
       state.fragment = await res.text();
       state.opened = [];
       history.replaceState(state, null, url);