Skip to content

Commit 61b56b8

Browse files
committed
fix(rehashing): wrap error in fmt.Errorf for better error context in calculateHash
1 parent 7ce6853 commit 61b56b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

image/app/core/rehashing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func calculateHash(ctx context.Context, dataverseKey, user, persistentId string,
141141
}
142142
h, err := doHash(ctx, dataverseKey, user, persistentId, node)
143143
if err != nil {
144-
return fmt.Errorf("failed to hash local file %v: %v", node.Attributes.DestinationFile.StorageIdentifier, err)
144+
return fmt.Errorf("failed to hash local file %v: %w", node.Attributes.DestinationFile.StorageIdentifier, err)
145145
}
146146
known.RemoteHashes[hashType] = fmt.Sprintf("%x", h)
147147
knownHashes[node.Id] = known

0 commit comments

Comments
 (0)