From 55e78f8bcb73f68dd5ce28ddb58b1d0551b7fdea Mon Sep 17 00:00:00 2001 From: Asra Ali Date: Fri, 19 Nov 2021 08:42:58 -0600 Subject: [PATCH] fix validation error Signed-off-by: Asra Ali --- pkg/types/hashedrekord/v0.0.1/entry.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/types/hashedrekord/v0.0.1/entry.go b/pkg/types/hashedrekord/v0.0.1/entry.go index 740530a31..93667d95d 100644 --- a/pkg/types/hashedrekord/v0.0.1/entry.go +++ b/pkg/types/hashedrekord/v0.0.1/entry.go @@ -158,8 +158,7 @@ func (v *V001Entry) validate() error { } v.sigObj, err = artifactFactory.NewSignature(bytes.NewReader(sig.Content)) if err != nil { - return errors.Wrap(err, "creating new signature object") - } + return types.ValidationError(err) key := sig.PublicKey if key == nil { @@ -167,7 +166,7 @@ func (v *V001Entry) validate() error { } v.keyObj, err = artifactFactory.NewPublicKey(bytes.NewReader(key.Content)) if err != nil { - return errors.Wrap(err, "creating new public key object") + return types.ValidationError(err) } data := v.HashedRekordObj.Data