mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-07 13:53:12 +00:00
fix(s3): return NoSuchTagSet for get_bucket_tagging when tags not set (#1567)
This commit is contained in:
@@ -4902,9 +4902,11 @@ impl S3 for FS {
|
|||||||
let Tagging { tag_set } = match metadata_sys::get_tagging_config(&bucket).await {
|
let Tagging { tag_set } = match metadata_sys::get_tagging_config(&bucket).await {
|
||||||
Ok((tags, _)) => tags,
|
Ok((tags, _)) => tags,
|
||||||
Err(err) => {
|
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);
|
warn!("get_tagging_config err {:?}", &err);
|
||||||
// TODO: check not found
|
return Err(ApiError::from(err).into());
|
||||||
Tagging::default()
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user