From ae50760fcc5703a1e4e1c05ab656fc0fff366f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=AD=A3=E8=B6=85?= Date: Wed, 21 Jan 2026 00:10:37 +0800 Subject: [PATCH] fix(s3): return NoSuchTagSet for get_bucket_tagging when tags not set (#1567) --- rustfs/src/storage/ecfs.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rustfs/src/storage/ecfs.rs b/rustfs/src/storage/ecfs.rs index e2c3cf81b..f7e4d6944 100644 --- a/rustfs/src/storage/ecfs.rs +++ b/rustfs/src/storage/ecfs.rs @@ -4902,9 +4902,11 @@ impl S3 for FS { let Tagging { tag_set } = match metadata_sys::get_tagging_config(&bucket).await { Ok((tags, _)) => tags, Err(err) => { + if err == StorageError::ConfigNotFound { + return Err(S3Error::with_message(S3ErrorCode::NoSuchTagSet, "The TagSet does not exist".to_string())); + } warn!("get_tagging_config err {:?}", &err); - // TODO: check not found - Tagging::default() + return Err(ApiError::from(err).into()); } };