aboutsummaryrefslogtreecommitdiff
path: root/src/api/api_server.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/api_server.rs
parentfb1e31add06ee3739fc95099aa5ffe96cf011e9c (diff)
downloadgarage-168a90dfb5489d465d64f066f375e5d06bc1f08c.tar.gz
garage-168a90dfb5489d465d64f066f375e5d06bc1f08c.zip
Fix some error codes
Diffstat (limited to 'src/api/api_server.rs')
-rw-r--r--src/api/api_server.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/api_server.rs b/src/api/api_server.rs
index 41ae6857..41aa0046 100644
--- a/src/api/api_server.rs
+++ b/src/api/api_server.rs
@@ -107,6 +107,7 @@ async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Respon
.and_then(|root_domain| host_to_bucket(&host, root_domain));
let endpoint = Endpoint::from_request(&req, bucket.map(ToOwned::to_owned))?;
+ debug!("Endpoint: {:?}", endpoint);
// Special code path for CreateBucket API endpoint
if let Endpoint::CreateBucket { bucket } = endpoint {
@@ -306,7 +307,7 @@ async fn resolve_bucket(
.bucket_helper()
.resolve_global_bucket_name(bucket_name)
.await?
- .ok_or(Error::NotFound)?)
+ .ok_or(Error::NoSuchBucket)?)
}
}