[object Object]

← back to Dw Pairs Well

design-coordinate: surface real error in .catch (was 'Could not load' / 'AI not ready' blackbox; now shows error.message inline + console.error with attempted URL — diagnostic for the Izara render failure on prod 2026-05-13)

a19993c1710d3ce96e2468a018fd336203e658f8 · 2026-05-13 10:55:48 -0700 · Steve

Files touched

Diff

commit a19993c1710d3ce96e2468a018fd336203e658f8
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed May 13 10:55:48 2026 -0700

    design-coordinate: surface real error in .catch (was 'Could not load' / 'AI not ready' blackbox; now shows error.message inline + console.error with attempted URL — diagnostic for the Izara render failure on prod 2026-05-13)
---
 deploy/shopify/design-coordinate.liquid | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/deploy/shopify/design-coordinate.liquid b/deploy/shopify/design-coordinate.liquid
index 33924de..ade08de 100644
--- a/deploy/shopify/design-coordinate.liquid
+++ b/deploy/shopify/design-coordinate.liquid
@@ -323,16 +323,24 @@
               root.hidden = true;
             }
           })
-          .catch(function () { catalogGrid.innerHTML = '<div class="pairs-well__empty">Could not load coordinates right now.</div>'; });
+          .catch(function (e) {
+            try { console.error('[design-coordinate] catalog load failed:', e, 'url=', buildUrl(endpointPairs, 24)); } catch (_) {}
+            var msg = (e && e.message) ? String(e.message).slice(0, 80) : 'unknown error';
+            catalogGrid.innerHTML = '<div class="pairs-well__empty">Could not load coordinates right now. <span style="opacity:.6;font-size:11px">('+msg+')</span></div>';
+          });
 
         var aiPromise = fetch(buildUrl(endpointAi, 24), { credentials: 'omit' })
           .then(function (r) { return r.ok ? r.json() : Promise.reject(new Error('http ' + r.status)); })
           .then(function (d) {
-            if (!d || d.ok === false) throw new Error('bad payload');
+            if (!d || d.ok === false) throw new Error((d && d.error) || 'bad payload');
             cachedAi = d.items || [];
             renderGrid(aiGrid, cachedAi, true);
           })
-          .catch(function () { aiGrid.innerHTML = '<div class="pairs-well__empty">AI generator not ready.</div>'; });
+          .catch(function (e) {
+            try { console.error('[design-coordinate] ai load failed:', e, 'url=', buildUrl(endpointAi, 24)); } catch (_) {}
+            var msg = (e && e.message) ? String(e.message).slice(0, 80) : 'unknown error';
+            aiGrid.innerHTML = '<div class="pairs-well__empty">AI generator not ready. <span style="opacity:.6;font-size:11px">('+msg+')</span></div>';
+          });
 
         return Promise.all([pairsPromise, aiPromise]);
       }

← c323508 server: GET / redirects to /preview.html  ·  back to Dw Pairs Well  ·  preview.html: accept handle (auto-detect vs dw_sku), deep-li c54aef9 →