fix: better 404 error message with full URL

This commit is contained in:
Accusys
2026-05-18 12:27:24 +08:00
parent 880425b335
commit 778d6b5984

View File

@@ -121,7 +121,7 @@ async function loadDoc(name) {
el.innerHTML = '<p>Loading...</p>';
try {
const resp = await fetch('/doc-wasm/modules/' + name + '.md');
if (!resp.ok) throw new Error('HTTP ' + resp.status);
if (!resp.ok) throw new Error('HTTP ' + resp.status + ' fetching /doc-wasm/modules/' + name + '.md');
const md = await resp.text();
if (!wasm_exports) throw new Error('WASM not loaded');
el.innerHTML = md2html(md);