avoid unnecessary logging for KMS secret key mismatch (#20549)

This commit is contained in:
Harshavardhana 2024-10-13 06:06:08 -07:00 committed by GitHub
parent 86a41d1631
commit 1593cb615d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -1099,7 +1099,9 @@ func (o *ObjectInfo) decryptPartsChecksums(h http.Header) {
if _, encrypted := crypto.IsEncrypted(o.UserDefined); encrypted {
decrypted, err := o.metadataDecrypter(h)("object-checksum", data)
if err != nil {
encLogIf(GlobalContext, err)
if !errors.Is(err, crypto.ErrSecretKeyMismatch) {
encLogIf(GlobalContext, err)
}
return
}
data = decrypted