From 1279baa72ba44376489dee132573fe970d2d5065 Mon Sep 17 00:00:00 2001 From: weisd Date: Mon, 17 Nov 2025 17:37:41 +0800 Subject: [PATCH] fix replication (#875) --- crates/ecstore/src/bucket/bucket_target_sys.rs | 14 ++++++++++++-- crates/ecstore/src/bucket/replication/config.rs | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/crates/ecstore/src/bucket/bucket_target_sys.rs b/crates/ecstore/src/bucket/bucket_target_sys.rs index dd5f6612..079c8cc5 100644 --- a/crates/ecstore/src/bucket/bucket_target_sys.rs +++ b/crates/ecstore/src/bucket/bucket_target_sys.rs @@ -1105,10 +1105,20 @@ impl TargetClient { Err(e) => match e { SdkError::ServiceError(oe) => match oe.into_err() { HeadBucketError::NotFound(_) => Ok(false), - other => Err(other.into()), + other => Err(S3ClientError::new(format!( + "failed to check bucket exists for bucket:{} please check the bucket name and credentials, error:{:?}", + bucket, other + ))), }, + SdkError::DispatchFailure(e) => Err(S3ClientError::new(format!( + "failed to dispatch bucket exists for bucket:{} error:{:?}", + bucket, e + ))), - _ => Err(e.into()), + _ => Err(S3ClientError::new(format!( + "failed to check bucket exists for bucket:{} error:{:?}", + bucket, e + ))), }, } } diff --git a/crates/ecstore/src/bucket/replication/config.rs b/crates/ecstore/src/bucket/replication/config.rs index 4a983498..4e427301 100644 --- a/crates/ecstore/src/bucket/replication/config.rs +++ b/crates/ecstore/src/bucket/replication/config.rs @@ -103,6 +103,8 @@ impl ReplicationConfigurationExt for ReplicationConfiguration { if filter.test_tags(&object_tags) { rules.push(rule.clone()); } + } else { + rules.push(rule.clone()); } }