From 42624ed7377c07e7faa3fd8c000ffb2991cc1078 Mon Sep 17 00:00:00 2001 From: Guillaume de Rouville Date: Tue, 1 Jun 2021 21:16:07 +0200 Subject: [PATCH] Dagger List cmd : change error message to a more verbose one Signed-off-by: Guillaume de Rouville --- keychain/encrypt.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keychain/encrypt.go b/keychain/encrypt.go index 35e41172..77a7a225 100644 --- a/keychain/encrypt.go +++ b/keychain/encrypt.go @@ -131,6 +131,9 @@ func Decrypt(_ context.Context, encrypted []byte) ([]byte, error) { } key, err := tree.Metadata.GetDataKey() if err != nil { + if userErr, ok := err.(sops.UserError); ok { + err = fmt.Errorf(userErr.UserError()) + } return nil, err }