Fix panic in tagging request proxying (#19032)

This commit is contained in:
Poorna
2024-02-11 18:18:43 -08:00
committed by GitHub
parent 53997ecc79
commit a9cf32811c
2 changed files with 5 additions and 3 deletions

View File

@@ -2409,8 +2409,7 @@ func proxyTaggingToRepTarget(ctx context.Context, bucket, object string, tags *t
taggedCount++
continue
}
errCode := minio.ToErrorResponse(err).Code
if errCode != "NoSuchKey" && errCode != "NoSuchVersion" {
if err != nil {
terr = err
}
}
@@ -2470,6 +2469,9 @@ func proxyGetTaggingToRepTarget(ctx context.Context, bucket, object string, opts
tgs, _ = tags.MapToObjectTags(tagSlc[idx])
}
}
if len(errs) == 1 {
proxy.Err = errs[0]
}
return tgs, proxy
}