aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_website.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-05 17:07:36 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-05 17:07:36 +0100
commit168a90dfb5489d465d64f066f375e5d06bc1f08c (patch)
tree7fd1430cb52cf77a654ba93324b40c05d936f5a8 /src/api/s3_website.rs
parentfb1e31add06ee3739fc95099aa5ffe96cf011e9c (diff)
downloadgarage-168a90dfb5489d465d64f066f375e5d06bc1f08c.tar.gz
garage-168a90dfb5489d465d64f066f375e5d06bc1f08c.zip
Fix some error codes
Diffstat (limited to 'src/api/s3_website.rs')
-rw-r--r--src/api/s3_website.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/s3_website.rs b/src/api/s3_website.rs
index e141e449..85d7c261 100644
--- a/src/api/s3_website.rs
+++ b/src/api/s3_website.rs
@@ -22,7 +22,7 @@ pub async fn handle_delete_website(
.bucket_table
.get(&EmptyKey, &bucket_id)
.await?
- .ok_or(Error::NotFound)?;
+ .ok_or(Error::NoSuchBucket)?;
if let crdt::Deletable::Present(param) = &mut bucket.state {
param.website_config.update(None);
@@ -50,7 +50,7 @@ pub async fn handle_put_website(
.bucket_table
.get(&EmptyKey, &bucket_id)
.await?
- .ok_or(Error::NotFound)?;
+ .ok_or(Error::NoSuchBucket)?;
let conf: WebsiteConfiguration = from_reader(&body as &[u8])?;
conf.validate()?;