Skip to content

Commit ad06e7a

Browse files
author
jojoliang
committed
update crc64 errmsg
1 parent 5210297 commit ad06e7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ func (c *Client) doAPI(ctx context.Context, req *http.Request, result interface{
307307
if c.Conf.EnableCRC && reader.writer != nil && !reader.disableCheckSum {
308308
localcrc := reader.Crc64()
309309
scoscrc := response.Header.Get("x-cos-hash-crc64ecma")
310-
icoscrc, _ := strconv.ParseUint(scoscrc, 10, 64)
310+
icoscrc, err := strconv.ParseUint(scoscrc, 10, 64)
311311
if icoscrc != localcrc {
312-
return response, fmt.Errorf("verification failed, want:%v, return:%v", localcrc, icoscrc)
312+
return response, fmt.Errorf("verification failed, want:%v, return:%v, x-cos-hash-crc64ecma:%v, err:%v", localcrc, icoscrc, scoscrc, err)
313313
}
314314
}
315315
}

0 commit comments

Comments
 (0)