@sanity/cli 4.10.0-next.28 → 4.10.0-next.29

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.
@@ -6330,7 +6330,7 @@ async function getCliPkg() {
6330
6330
  try {
6331
6331
  data = await fs__default.default.readFile(path__default.default.join(cliPath, "package.json"), "utf-8");
6332
6332
  } catch (err) {
6333
- throw new Error(`Unable to read @sanity/cli/package.json: ${err.message}`);
6333
+ throw new Error(`Unable to read @sanity/cli/package.json: ${err.message}`, { cause: err });
6334
6334
  }
6335
6335
  return JSON.parse(data);
6336
6336
  }
@@ -53800,11 +53800,13 @@ async function initSanity(args, context) {
53800
53800
  }), useDefaultPlan)
53801
53801
  print("Using default plan.");
53802
53802
  else
53803
- throw new Error(`Coupon "${intendedCoupon}" does not exist`);
53803
+ throw new Error(`Coupon "${intendedCoupon}" does not exist`, { cause: err });
53804
53804
  } else
53805
53805
  throw new Error(`Unable to validate coupon, please try again later:
53806
53806
 
53807
- ${err.message}`);
53807
+ ${err.message}`, {
53808
+ cause: err
53809
+ });
53808
53810
  }
53809
53811
  else if (intendedPlan)
53810
53812
  try {
@@ -53823,11 +53825,13 @@ ${err.message}`);
53823
53825
  }), useDefaultPlan)
53824
53826
  print("Using default plan.");
53825
53827
  else
53826
- throw new Error(`Plan id "${intendedPlan}" does not exist`);
53828
+ throw new Error(`Plan id "${intendedPlan}" does not exist`, { cause: err });
53827
53829
  } else
53828
53830
  throw new Error(`Unable to validate plan, please try again later:
53829
53831
 
53830
- ${err.message}`);
53832
+ ${err.message}`, {
53833
+ cause: err
53834
+ });
53831
53835
  }
53832
53836
  if (reconfigure)
53833
53837
  throw new Error("`--reconfigure` is deprecated - manual configuration is now required");
@@ -54131,7 +54135,7 @@ Join the Sanity community: ${chalk2.cyan("https://www.sanity.io/community/join")
54131
54135
  userAction: "select"
54132
54136
  };
54133
54137
  throw new Error(`Failed to communicate with the Sanity API:
54134
- ${err.message}`);
54138
+ ${err.message}`, { cause: err });
54135
54139
  }
54136
54140
  if (projects.length === 0 && unattended)
54137
54141
  throw new Error("No projects found for current user");