Skip to content

Commit 5210297

Browse files
author
jojoliang
committed
check crc print err
1 parent 5bbe2a2 commit 5210297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

object.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,9 @@ func (s *ObjectService) Upload(ctx context.Context, name string, filepath string
11831183

11841184
if resp != nil && s.client.Conf.EnableCRC && !opt.DisableChecksum {
11851185
scoscrc := resp.Header.Get("x-cos-hash-crc64ecma")
1186-
icoscrc, _ := strconv.ParseUint(scoscrc, 10, 64)
1186+
icoscrc, err := strconv.ParseUint(scoscrc, 10, 64)
11871187
if icoscrc != localcrc {
1188-
return v, resp, fmt.Errorf("verification failed, want:%v, return:%v", localcrc, icoscrc)
1188+
return v, resp, fmt.Errorf("verification failed, want:%v, return:%v, x-cos-hash-crc64ecma: %v, err:%v", localcrc, icoscrc, scoscrc, err)
11891189
}
11901190
}
11911191
return v, resp, err

0 commit comments

Comments
 (0)