fix replication (#875)

This commit is contained in:
weisd
2025-11-17 17:37:41 +08:00
committed by GitHub
parent acdefb6703
commit 1279baa72b
2 changed files with 14 additions and 2 deletions

View File

@@ -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
))),
},
}
}

View File

@@ -103,6 +103,8 @@ impl ReplicationConfigurationExt for ReplicationConfiguration {
if filter.test_tags(&object_tags) {
rules.push(rule.clone());
}
} else {
rules.push(rule.clone());
}
}