mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
fix
This commit is contained in:
+23
-13
@@ -832,40 +832,50 @@ pub fn error_resp_to_object_err(err: ErrorResponse, params: Vec<&str>) -> std::i
|
||||
/*S3ErrorCode::BucketAlreadyOwnedByYou => {
|
||||
err = Error::from(StorageError::BucketAlreadyOwnedByYou);
|
||||
}*/
|
||||
S3ErrorCode::BucketNotEmpty => std::io::Error::other(StorageError::BucketNotEmpty("".to_string()).to_string()),
|
||||
S3ErrorCode::BucketNotEmpty => {
|
||||
err = std::io::Error::other(StorageError::BucketNotEmpty("".to_string()).to_string());
|
||||
}
|
||||
/*S3ErrorCode::NoSuchBucketPolicy => {
|
||||
err = Error::from(StorageError::BucketPolicyNotFound);
|
||||
}*/
|
||||
/*S3ErrorCode::NoSuchLifecycleConfiguration => {
|
||||
err = Error::from(StorageError::BucketLifecycleNotFound);
|
||||
}*/
|
||||
S3ErrorCode::InvalidBucketName => std::io::Error::other(StorageError::BucketNameInvalid(bucket)),
|
||||
S3ErrorCode::InvalidPart => {
|
||||
std::io::Error::other(StorageError::InvalidPart(0, bucket, object /* , version_id */))
|
||||
S3ErrorCode::InvalidBucketName => {
|
||||
err = std::io::Error::other(StorageError::BucketNameInvalid(bucket));
|
||||
}
|
||||
S3ErrorCode::InvalidPart => {
|
||||
err = std::io::Error::other(StorageError::InvalidPart(0, bucket, object /* , version_id */));
|
||||
}
|
||||
S3ErrorCode::NoSuchBucket => {
|
||||
err = std::io::Error::other(StorageError::BucketNotFound(bucket));
|
||||
}
|
||||
S3ErrorCode::NoSuchBucket => std::io::Error::other(StorageError::BucketNotFound(bucket)),
|
||||
S3ErrorCode::NoSuchKey => {
|
||||
if !object.is_empty() {
|
||||
std::io::Error::other(StorageError::ObjectNotFound(bucket, object))
|
||||
if object != "" {
|
||||
err = std::io::Error::other(StorageError::ObjectNotFound(bucket, object));
|
||||
} else {
|
||||
std::io::Error::other(StorageError::BucketNotFound(bucket))
|
||||
err = std::io::Error::other(StorageError::BucketNotFound(bucket));
|
||||
}
|
||||
}
|
||||
S3ErrorCode::NoSuchVersion => {
|
||||
if !object.is_empty() {
|
||||
std::io::Error::other(StorageError::ObjectNotFound(bucket, object));
|
||||
if object != "" {
|
||||
err = std::io::Error::other(StorageError::ObjectNotFound(bucket, object)); //, version_id);
|
||||
} else {
|
||||
std::io::Error::other(StorageError::BucketNotFound(bucket))
|
||||
err = std::io::Error::other(StorageError::BucketNotFound(bucket));
|
||||
}
|
||||
}
|
||||
/*S3ErrorCode::XRustFsInvalidObjectName => {
|
||||
err = Error::from(StorageError::ObjectNameInvalid(bucket, object));
|
||||
}*/
|
||||
S3ErrorCode::AccessDenied => std::io::Error::other(StorageError::PrefixAccessDenied(bucket, object)),
|
||||
S3ErrorCode::AccessDenied => {
|
||||
err = std::io::Error::other(StorageError::PrefixAccessDenied(bucket, object));
|
||||
}
|
||||
/*S3ErrorCode::XAmzContentSHA256Mismatch => {
|
||||
err = hash.SHA256Mismatch{};
|
||||
}*/
|
||||
S3ErrorCode::NoSuchUpload => std::io::Error::other(StorageError::InvalidUploadID(bucket, object, version_id)),
|
||||
S3ErrorCode::NoSuchUpload => {
|
||||
err = std::io::Error::other(StorageError::InvalidUploadID(bucket, object, version_id));
|
||||
}
|
||||
/*S3ErrorCode::EntityTooSmall => {
|
||||
err = std::io::Error::other(StorageError::PartTooSmall);
|
||||
}*/
|
||||
|
||||
@@ -393,7 +393,7 @@ impl Operation for GetTierInfo {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Default)]
|
||||
#[derive(Debug, serde::Deserialize, Default)]
|
||||
pub struct ClearTierQuery {
|
||||
pub rand: Option<String>,
|
||||
pub force: String,
|
||||
|
||||
Reference in New Issue
Block a user