diff --git a/rustfs/src/error.rs b/rustfs/src/error.rs index 4caaf0635..19041a8bf 100644 --- a/rustfs/src/error.rs +++ b/rustfs/src/error.rs @@ -63,7 +63,7 @@ impl From for ApiError { StorageError::BucketNotEmpty(_) => S3ErrorCode::BucketNotEmpty, StorageError::BucketNameInvalid(_) => S3ErrorCode::InvalidBucketName, StorageError::ObjectNameInvalid(_, _) => S3ErrorCode::InvalidArgument, - StorageError::BucketExists(_) => S3ErrorCode::BucketAlreadyExists, + StorageError::BucketExists(_) => S3ErrorCode::BucketAlreadyOwnedByYou, StorageError::StorageFull => S3ErrorCode::ServiceUnavailable, StorageError::SlowDown => S3ErrorCode::SlowDown, StorageError::PrefixAccessDenied(_, _) => S3ErrorCode::AccessDenied, @@ -210,7 +210,7 @@ mod tests { StorageError::ObjectNameInvalid("test".into(), "test".into()), S3ErrorCode::InvalidArgument, ), - (StorageError::BucketExists("test".into()), S3ErrorCode::BucketAlreadyExists), + (StorageError::BucketExists("test".into()), S3ErrorCode::BucketAlreadyOwnedByYou), (StorageError::StorageFull, S3ErrorCode::ServiceUnavailable), (StorageError::SlowDown, S3ErrorCode::SlowDown), (StorageError::PrefixAccessDenied("test".into(), "test".into()), S3ErrorCode::AccessDenied),