mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-12 16:27:28 +02:00
Bubble up error when we fail to encrypt history entries
This commit is contained in:
@ -626,7 +626,7 @@ func EncryptAndMarshal(config *hctx.ClientConfig, entries []*data.HistoryEntry)
|
|||||||
for _, entry := range entries {
|
for _, entry := range entries {
|
||||||
encEntry, err := data.EncryptHistoryEntry(config.UserSecret, *entry)
|
encEntry, err := data.EncryptHistoryEntry(config.UserSecret, *entry)
|
||||||
if err != nil {
|
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
|
encEntry.DeviceId = config.DeviceId
|
||||||
encEntries = append(encEntries, encEntry)
|
encEntries = append(encEntries, encEntry)
|
||||||
|
Reference in New Issue
Block a user