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