[object Object]

← back to Grassclothwallpaper

Harden gitignore (bak/output artifacts) and add null/error guards to test-new-grid.html

6067fde31998afbd3f5228009e7551bd9bf3ec69 · 2026-05-18 20:32:48 -0700 · SteveStudio2

Files touched

Diff

commit 6067fde31998afbd3f5228009e7551bd9bf3ec69
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Mon May 18 20:32:48 2026 -0700

    Harden gitignore (bak/output artifacts) and add null/error guards to test-new-grid.html
---
 .gitignore         |  4 ++++
 test-new-grid.html | 12 ++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/.gitignore b/.gitignore
index 1924158..0915a71 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,7 @@ tmp/
 dist/
 build/
 .next/
+*.bak
+*.pre-*
+failed-migrations.json
+product-colors.json
diff --git a/test-new-grid.html b/test-new-grid.html
index 73daa8d..1a5fb3e 100644
--- a/test-new-grid.html
+++ b/test-new-grid.html
@@ -24,8 +24,20 @@
                 }
             );
 
+            if (!response.ok) {
+                console.log(`❌ Request failed: ${response.status} ${response.statusText}`);
+                document.body.innerHTML += '<p style="color: red;">❌ Request failed</p>';
+                return;
+            }
+
             const products = await response.json();
 
+            if (!Array.isArray(products) || products.length === 0) {
+                console.log('❌ No products returned');
+                document.body.innerHTML += '<p style="color: red;">❌ No products returned</p>';
+                return;
+            }
+
             console.log(`✅ Loaded ${products.length} products\n`);
             console.log('Sample products:');
 

← a59a2f4 initial scaffold  ·  back to Grassclothwallpaper  ·  Guard against non-array Supabase fetch responses in crop/col 84ebfa2 →