@shopify/hydrogen 2023.7.0 → 2023.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -378,7 +378,13 @@ async function fetchWithServerCache(url, requestInit, {
378
378
  try {
379
379
  data = await response[returnType]();
380
380
  } catch {
381
- data = await response.text();
381
+ try {
382
+ data = await response.text();
383
+ } catch {
384
+ throw new Error(
385
+ `Storefront API response code: ${response.status} (Request Id: ${response.headers.get("x-request-id")})`
386
+ );
387
+ }
382
388
  }
383
389
  return toSerializableResponse(data, response);
384
390
  },
@@ -413,7 +419,7 @@ var warnOnce = (string) => {
413
419
  };
414
420
 
415
421
  // src/version.ts
416
- var LIB_VERSION = "2023.7.0";
422
+ var LIB_VERSION = "2023.7.2";
417
423
 
418
424
  // src/storefront.ts
419
425
  var StorefrontApiError = class extends Error {