diff --git a/CHANGELOG.md b/CHANGELOG.md index a278c06..d9c4717 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ VC Verifier Changelog WIP --- +- allow gs1 chaining library to access verification erros + 2.0.3 (2024-07-23) - fix container startup diff --git a/api/src/services/verifier/index.ts b/api/src/services/verifier/index.ts index 023fe2e..cf36609 100644 --- a/api/src/services/verifier/index.ts +++ b/api/src/services/verifier/index.ts @@ -179,8 +179,14 @@ export class Verifier { if (!result) throw Error("Provided verifiable object is of unknown type!"); // make non enumeratable errors enumeratable for the respsonse - if (result.error && !result.error.errors) - result.error.name = result.error.message; + if (result.error) { + if (!result.error.errors) { + result.error.name = result.error.message; + } + if (result.error.errors) { + result.errors = result.error.errors; + } + } return result; }