Bubble up error when we fail to encrypt history entries

This commit is contained in:
David Dworken 2023-10-07 20:01:36 -07:00
parent 190b3b45ae
commit 4bb0ebfb2e
No known key found for this signature in database

View File

@ -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)