This commit is contained in:
likewu
2025-06-28 14:54:01 +08:00
parent a770b17e0c
commit 4d86866d61
+5 -1
View File
@@ -809,6 +809,7 @@ pub fn error_resp_to_object_err(err: ErrorResponse, params: Vec<&str>) -> std::i
return std::io::Error::other(ObjectApiError::BackendDown(format!("{err}")));
}
let err_ = std::io::Error::other(err.to_string());
let r_err = err;
let err;
let bucket = bucket.to_string();
@@ -852,7 +853,7 @@ pub fn error_resp_to_object_err(err: ErrorResponse, params: Vec<&str>) -> std::i
}
S3ErrorCode::NoSuchVersion => {
if !object.is_empty() {
std::io::Error::other(StorageError::ObjectNotFound(bucket, object)) //, version_id);
std::io::Error::other(StorageError::ObjectNotFound(bucket, object));
} else {
std::io::Error::other(StorageError::BucketNotFound(bucket))
}
@@ -876,6 +877,9 @@ pub fn error_resp_to_object_err(err: ErrorResponse, params: Vec<&str>) -> std::i
}
}
err
}
pub fn storage_to_object_err(err: Error, params: Vec<&str>) -> S3Error {
let storage_err = &err;
let mut bucket: String = "".to_string();