Report every failed fetch instead of discarding it

Twenty-four fetch chains ended in an empty catch, which is not error handling
but error deletion: the request fails, nothing renders, nothing is logged, and
the surface sits on Loading forever. That is how the mesh chat's ReferenceError
read as a slow load for as long as it did.
This commit is contained in:
Gmer4Lfe
2026-08-21 09:23:51 -04:00
parent 906375dc23
commit 146be2d0ad
9 changed files with 55 additions and 24 deletions
+4 -4
View File
@@ -618,7 +618,7 @@ vv_ai_chat_markup('vv-ai', [
function loadBanner(live) {
fetch(API + '?action=stats' + (live ? '&live=1' : '')).then(r => r.json())
.then(d => { if (d.ok) renderBanner(d.stats); })
.catch(() => {});
.catch(e => vvFetchErr('AI banner', e));
}
// ── Bug reports ─────────────────────────────────────────────────────────
@@ -628,7 +628,7 @@ vv_ai_chat_markup('vv-ai', [
function loadBugs() {
fetch(API + '?action=bugs').then(r => r.json())
.then(d => { if (d.ok) renderBugs(d.bugs || []); })
.catch(() => {});
.catch(e => vvFetchErr('AI bug list', e));
}
function renderBugs(bugs) {
@@ -750,7 +750,7 @@ vv_ai_chat_markup('vv-ai', [
fetch(API, { method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
body: new URLSearchParams({ action: 'bug_close', id, open: '0' }) })
.then(() => loadBugs()).catch(() => {});
.then(() => loadBugs()).catch(e => vvFetchErr('AI bug report', e));
};
// ── Findings & proposals ────────────────────────────────────────────────
@@ -1108,7 +1108,7 @@ vv_ai_chat_markup('vv-ai', [
function loadTokens() {
fetch(API + '?action=tokens').then(r => r.json())
.then(d => { if (d.ok) { tokData = d.tokens; renderTokens(); } })
.catch(() => {});
.catch(e => vvFetchErr('AI token ledger', e));
}
function renderTokens() {