fix: render errors as HTML given correct content-type
1 file changed, 2 insertions(+), 1 deletion(-)
jump to
M frontend/static/search.js → frontend/static/search.js
@@ -80,7 +80,8 @@ fetch: "true", }, }); - 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);