← back to Re Flyer Aggregator
flyers: add visible .catch() error state on flyers.json load (TK-11773)
c51dbfbc3546381d497445b77f7d795b0f0afc93 · 2026-09-15 17:54:42 -0700 · Steve
Kills the silent-empty-grid failure class entirely — any load failure (creds-in-URL,
network, 500, bad JSON) now shows a red message + 'load failed' stat instead of a blank grid.
Complements the restored creds-in-URL fetch guard.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHzse5aKM9vgbEhXxho7B3
Files touched
M public/flyers/index.html
Diff
commit c51dbfbc3546381d497445b77f7d795b0f0afc93
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Sep 15 17:54:42 2026 -0700
flyers: add visible .catch() error state on flyers.json load (TK-11773)
Kills the silent-empty-grid failure class entirely — any load failure (creds-in-URL,
network, 500, bad JSON) now shows a red message + 'load failed' stat instead of a blank grid.
Complements the restored creds-in-URL fetch guard.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GHzse5aKM9vgbEhXxho7B3
---
public/flyers/index.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/public/flyers/index.html b/public/flyers/index.html
index 22ee681..fc1035b 100644
--- a/public/flyers/index.html
+++ b/public/flyers/index.html
@@ -92,5 +92,7 @@ fetch('flyers.json').then(r=>r.json()).then(j=>{DEALS=j;
sort.value=localStorage.flySort||'date'; // default: Newest first (freshest deals on top)
recency.value=localStorage.flyRecency||'0'; // default: All time (so full inventory shows, not just the ~47 fresh)
if(localStorage.flyDens)document.getElementById('dens').value=localStorage.flyDens;
- dens();render();});
+ dens();render();}).catch(e=>{
+ document.getElementById('grid').innerHTML='<div style="grid-column:1/-1;padding:40px;text-align:center;color:#b91c1c;font-size:14px">Could not load flyers ('+(e&&e.message||e)+'). Try reloading without credentials in the URL.</div>';
+ document.getElementById('stat').textContent='load failed';});
</script></body></html>
\ No newline at end of file
← 3484f65 restore creds-in-URL fetch guard on flyers page (regression
·
back to Re Flyer Aggregator
·
security: add rel=noopener noreferrer to target=_blank links 4dd6fea →