mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-24 05:06:28 +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 => {
|
/*S3ErrorCode::BucketAlreadyOwnedByYou => {
|
||||||
err = Error::from(StorageError::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 => {
|
/*S3ErrorCode::NoSuchBucketPolicy => {
|
||||||
err = Error::from(StorageError::BucketPolicyNotFound);
|
err = Error::from(StorageError::BucketPolicyNotFound);
|
||||||
}*/
|
}*/
|
||||||
/*S3ErrorCode::NoSuchLifecycleConfiguration => {
|
/*S3ErrorCode::NoSuchLifecycleConfiguration => {
|
||||||
err = Error::from(StorageError::BucketLifecycleNotFound);
|
err = Error::from(StorageError::BucketLifecycleNotFound);
|
||||||
}*/
|
}*/
|
||||||
S3ErrorCode::InvalidBucketName => std::io::Error::other(StorageError::BucketNameInvalid(bucket)),
|
S3ErrorCode::InvalidBucketName => {
|
||||||
S3ErrorCode::InvalidPart => {
|
err = std::io::Error::other(StorageError::BucketNameInvalid(bucket));
|
||||||
std::io::Error::other(StorageError::InvalidPart(0, bucket, object /* , version_id */))
|
}
|
||||||
|
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 => {
|
S3ErrorCode::NoSuchKey => {
|
||||||
if !object.is_empty() {
|
if object != "" {
|
||||||
std::io::Error::other(StorageError::ObjectNotFound(bucket, object))
|
err = std::io::Error::other(StorageError::ObjectNotFound(bucket, object));
|
||||||
} else {
|
} else {
|
||||||
std::io::Error::other(StorageError::BucketNotFound(bucket))
|
err = std::io::Error::other(StorageError::BucketNotFound(bucket));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
S3ErrorCode::NoSuchVersion => {
|
S3ErrorCode::NoSuchVersion => {
|
||||||
if !object.is_empty() {
|
if object != "" {
|
||||||
std::io::Error::other(StorageError::ObjectNotFound(bucket, object));
|
err = std::io::Error::other(StorageError::ObjectNotFound(bucket, object)); //, version_id);
|
||||||
} else {
|
} else {
|
||||||
std::io::Error::other(StorageError::BucketNotFound(bucket))
|
err = std::io::Error::other(StorageError::BucketNotFound(bucket));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*S3ErrorCode::XRustFsInvalidObjectName => {
|
/*S3ErrorCode::XRustFsInvalidObjectName => {
|
||||||
err = Error::from(StorageError::ObjectNameInvalid(bucket, object));
|
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 => {
|
/*S3ErrorCode::XAmzContentSHA256Mismatch => {
|
||||||
err = hash.SHA256Mismatch{};
|
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 => {
|
/*S3ErrorCode::EntityTooSmall => {
|
||||||
err = std::io::Error::other(StorageError::PartTooSmall);
|
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 struct ClearTierQuery {
|
||||||
pub rand: Option<String>,
|
pub rand: Option<String>,
|
||||||
pub force: String,
|
pub force: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user