aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3/api_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <lx@deuxfleurs.fr>2025-01-29 19:14:34 +0100
committerAlex Auvolat <lx@deuxfleurs.fr>2025-01-29 19:14:34 +0100
commit9f3c7c3720d323bc9df3892197e6da5d89d1b84a (patch)
tree8e1abf81071116f71a3c969a7d5dfcf43d8c1703 /src/api/s3/api_server.rs
parenta1d081ee840b1727ba1b3f430638a1296738283e (diff)
downloadgarage-9f3c7c3720d323bc9df3892197e6da5d89d1b84a.tar.gz
garage-9f3c7c3720d323bc9df3892197e6da5d89d1b84a.zip
api: better handling of helper errors to distinguish error codes
Diffstat (limited to 'src/api/s3/api_server.rs')
-rw-r--r--src/api/s3/api_server.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/s3/api_server.rs b/src/api/s3/api_server.rs
index 1737af33..f9dafa10 100644
--- a/src/api/s3/api_server.rs
+++ b/src/api/s3/api_server.rs
@@ -150,7 +150,8 @@ impl ApiHandler for S3ApiServer {
let bucket_id = garage
.bucket_helper()
.resolve_bucket(&bucket_name, &api_key)
- .await?;
+ .await
+ .map_err(pass_helper_error)?;
let bucket = garage
.bucket_helper()
.get_existing_bucket(bucket_id)