api: better handling of helper errors to distinguish error codes

This commit is contained in:
Alex Auvolat
2025-01-29 19:14:34 +01:00
parent a1d081ee84
commit 9f3c7c3720
12 changed files with 97 additions and 29 deletions
+2 -1
View File
@@ -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)