fix: map unversioned destination replication error correctly (#1645)

This commit is contained in:
evan slack
2026-01-28 21:13:36 -05:00
committed by GitHub
parent a81bbed551
commit 51e8a4820f
@@ -431,13 +431,15 @@ impl BucketTargetSys {
let versioning = target_client
.get_bucket_versioning(&target.target_bucket)
.await
.map_err(|_e| BucketTargetError::BucketReplicationSourceNotVersioned {
bucket: bucket.to_string(),
.map_err(|e| BucketTargetError::RemoteTargetConnectionErr {
bucket: target.target_bucket.clone(),
access_key: target.credentials.as_ref().map(|c| c.access_key.clone()).unwrap_or_default(),
error: e.to_string(),
})?;
if versioning.is_none() {
return Err(BucketTargetError::BucketReplicationSourceNotVersioned {
bucket: bucket.to_string(),
return Err(BucketTargetError::BucketRemoteTargetNotVersioned {
bucket: target.target_bucket.to_string(),
});
}
}