S3 DELETE call returns 204, not 200.

According to the S3 API docs, the DELETE call returns code "204 No content"
on success.
This commit is contained in:
Heikki Linnakangas
2021-10-17 16:01:44 +03:00
parent b405eef324
commit bdd039a9ee

View File

@@ -115,9 +115,9 @@ impl RelishStorage for RustS3 {
.delete_object(path.key())
.await
.with_context(|| format!("Failed to delete s3 object with key {}", path.key()))?;
if code != 200 {
if code != 204 {
Err(anyhow::format_err!(
"Received non-200 exit code during deleting object with key '{}', code: {}",
"Received non-204 exit code during deleting object with key '{}', code: {}",
path.key(),
code
))