Skip to content

Commit e5441de

Browse files
committed
Log CRC in case of invalid upload for GCS HMAC
1 parent 3161a31 commit e5441de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pbm/storage/gcs/hmac_client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ func (h hmacClient) save(name string, data io.Reader, options ...storage.Option)
9797

9898
localCRC := crcToBase64(crc.Sum32())
9999
if putInfo.ChecksumCRC32C != localCRC {
100-
return errors.Errorf("wrong CRC after uploading %s", name)
100+
return errors.Errorf("wrong CRC after uploading %s, GCS: %s, PBM: %s",
101+
name, putInfo.ChecksumCRC32C, localCRC)
101102
}
102103

103104
return nil

0 commit comments

Comments
 (0)