diff options
Diffstat (limited to 'src/api/k2v/api_server.rs')
-rw-r--r-- | src/api/k2v/api_server.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/k2v/api_server.rs b/src/api/k2v/api_server.rs index f2a3942e..de6e5f06 100644 --- a/src/api/k2v/api_server.rs +++ b/src/api/k2v/api_server.rs @@ -90,11 +90,13 @@ impl ApiHandler for K2VApiServer { 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) - .await?; + .await + .map_err(helper_error_as_internal)?; let bucket_params = bucket.state.into_option().unwrap(); let allowed = match endpoint.authorization_type() { |