diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-05 17:07:36 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-05 17:07:36 +0100 |
commit | 168a90dfb5489d465d64f066f375e5d06bc1f08c (patch) | |
tree | 7fd1430cb52cf77a654ba93324b40c05d936f5a8 /src/api/s3_delete.rs | |
parent | fb1e31add06ee3739fc95099aa5ffe96cf011e9c (diff) | |
download | garage-168a90dfb5489d465d64f066f375e5d06bc1f08c.tar.gz garage-168a90dfb5489d465d64f066f375e5d06bc1f08c.zip |
Fix some error codes
Diffstat (limited to 'src/api/s3_delete.rs')
-rw-r--r-- | src/api/s3_delete.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/s3_delete.rs b/src/api/s3_delete.rs index 1976139b..9e267490 100644 --- a/src/api/s3_delete.rs +++ b/src/api/s3_delete.rs @@ -21,7 +21,7 @@ async fn handle_delete_internal( .object_table .get(&bucket_id, &key.to_string()) .await? - .ok_or(Error::NotFound)?; // No need to delete + .ok_or(Error::NoSuchKey)?; // No need to delete let interesting_versions = object.versions().iter().filter(|v| { !matches!( @@ -40,7 +40,7 @@ async fn handle_delete_internal( timestamp = std::cmp::max(timestamp, v.timestamp + 1); } - let deleted_version = version_to_delete.ok_or(Error::NotFound)?; + let deleted_version = version_to_delete.ok_or(Error::NoSuchKey)?; let version_uuid = gen_uuid(); |