mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-29 16:37:09 +00:00
api: better handling of helper errors to distinguish error codes
This commit is contained in:
+2
-1
@@ -655,7 +655,8 @@ async fn get_copy_source(ctx: &ReqCtx, req: &Request<ReqBody>) -> Result<Object,
|
||||
let source_bucket_id = garage
|
||||
.bucket_helper()
|
||||
.resolve_bucket(&source_bucket.to_string(), api_key)
|
||||
.await?;
|
||||
.await
|
||||
.map_err(pass_helper_error)?;
|
||||
|
||||
if !api_key.allow_read(&source_bucket_id) {
|
||||
return Err(Error::forbidden(format!(
|
||||
|
||||
Reference in New Issue
Block a user