From 4bb0ebfb2e56fd765b74bdd7f9dcef78445f9d4f Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sat, 7 Oct 2023 20:01:36 -0700 Subject: [PATCH] Bubble up error when we fail to encrypt history entries --- client/lib/lib.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/lib/lib.go b/client/lib/lib.go index d291397..66bd1b5 100644 --- a/client/lib/lib.go +++ b/client/lib/lib.go @@ -626,7 +626,7 @@ func EncryptAndMarshal(config *hctx.ClientConfig, entries []*data.HistoryEntry) for _, entry := range entries { encEntry, err := data.EncryptHistoryEntry(config.UserSecret, *entry) if err != nil { - return nil, fmt.Errorf("failed to encrypt history entry") + return nil, fmt.Errorf("failed to encrypt history entry: %w", err) } encEntry.DeviceId = config.DeviceId encEntries = append(encEntries, encEntry)