S3 compatibility: return 404 instead of 400 on some multipart commands
This commit is contained in:
parent
55a2a636ca
commit
e64ecbdccd
1 changed files with 3 additions and 13 deletions
|
@ -384,9 +384,7 @@ pub async fn handle_put_part(
|
|||
.iter()
|
||||
.any(|v| v.uuid == version_uuid && v.is_uploading())
|
||||
{
|
||||
return Err(Error::BadRequest(format!(
|
||||
"Multipart upload does not exist or is otherwise invalid"
|
||||
)));
|
||||
return Err(Error::NotFound);
|
||||
}
|
||||
|
||||
// Copy block to store
|
||||
|
@ -438,11 +436,7 @@ pub async fn handle_complete_multipart_upload(
|
|||
.iter()
|
||||
.find(|v| v.uuid == version_uuid && v.is_uploading());
|
||||
let mut object_version = match object_version {
|
||||
None => {
|
||||
return Err(Error::BadRequest(format!(
|
||||
"Multipart upload does not exist or has already been completed"
|
||||
)))
|
||||
}
|
||||
None => return Err(Error::NotFound),
|
||||
Some(x) => x.clone(),
|
||||
};
|
||||
|
||||
|
@ -532,11 +526,7 @@ pub async fn handle_abort_multipart_upload(
|
|||
.iter()
|
||||
.find(|v| v.uuid == version_uuid && v.is_uploading());
|
||||
let mut object_version = match object_version {
|
||||
None => {
|
||||
return Err(Error::BadRequest(format!(
|
||||
"Multipart upload does not exist or has already been completed"
|
||||
)))
|
||||
}
|
||||
None => return Err(Error::NotFound),
|
||||
Some(x) => x.clone(),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue