We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5071cda commit 1e9d0a8Copy full SHA for 1e9d0a8
1 file changed
web/app/api.js
@@ -500,7 +500,9 @@
500
form.append("file", file);
501
const res = await fetch("/ingest", { method: "POST", body: form });
502
if (!res.ok) {
503
- throw new Error(`${res.status} ${res.statusText}: ${await res.text()}`);
+ let detail = await res.text();
504
+ try { detail = JSON.parse(detail).detail || detail; } catch { /* keep raw text */ }
505
+ throw new Error(detail);
506
}
507
return res.json(); // { paper_id, chunks_added, corpus_chunks }
508
0 commit comments