fix(s3): return NoSuchTagSet from GetBucketTagging on untagged buckets (#4585)

GetBucketTagging returned 200 with an empty TagSet when a bucket had no tags, including after DeleteBucketTagging. AWS returns the NoSuchTagSet error instead. S3 Control ListTagsForResource still reports an empty list.
This commit is contained in:
Niels Kootstra authored and GitHub committed 2026-09-28 16:25:06 -04:00
1 parent fbbbf244af
commit 93ec5967fe
4 files changed
+54 -6

No files matched your search

@@ -2119,6 +2119,9 @@ public class S3Controller {
private Response handleGetBucketTagging(String bucket) {
Map<String, String> tags = s3Service.getBucketTagging(bucket);
if (tags.isEmpty()) {
throw new AwsException("NoSuchTagSet", "The TagSet does not exist", 404);
}
return Response.ok(buildTaggingXml(tags)).type(MediaType.APPLICATION_XML).build();
}