@peac/protocol 0.13.1 → 0.13.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.
package/dist/index.mjs CHANGED
@@ -879,8 +879,8 @@ function parseIssuerConfig(json) {
879
879
  }
880
880
  try {
881
881
  config = JSON.parse(json);
882
- } catch {
883
- throw new Error("Issuer config is not valid JSON");
882
+ } catch (err) {
883
+ throw new Error("Issuer config is not valid JSON", { cause: err });
884
884
  }
885
885
  } else {
886
886
  config = json;
@@ -903,8 +903,8 @@ function parseIssuerConfig(json) {
903
903
  }
904
904
  try {
905
905
  new URL(obj.jwks_uri);
906
- } catch {
907
- throw new Error("jwks_uri must be a valid URL");
906
+ } catch (err) {
907
+ throw new Error("jwks_uri must be a valid URL", { cause: err });
908
908
  }
909
909
  if (obj.verify_endpoint !== void 0) {
910
910
  if (typeof obj.verify_endpoint !== "string") {
@@ -997,8 +997,8 @@ function parsePolicyManifest(text, contentType) {
997
997
  if (isJsonContent(text, contentType)) {
998
998
  try {
999
999
  manifest = JSON.parse(text);
1000
- } catch {
1001
- throw new Error("Policy manifest is not valid JSON");
1000
+ } catch (err) {
1001
+ throw new Error("Policy manifest is not valid JSON", { cause: err });
1002
1002
  }
1003
1003
  } else {
1004
1004
  manifest = parseSimpleYaml(text);