Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/riak_cs_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ check_bucket_exists(Bucket, RiakPid) ->
_ ->
{ok, Obj}
end;
{error, notfound} ->
{error, no_such_bucket};
{error, _}=Error ->
Error
end.
Expand Down
9 changes: 7 additions & 2 deletions src/riak_cs_wm_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ object_access_authorize_helper(AccessType, Deletable,

#key_context{bucket=Bucket} = LocalCtx,
case translate_bucket_policy(PolicyMod, Bucket, RiakPid) of
{error, multiple_bucket_owners=E} ->
{error, E} ->
%% We want to bail out early if there are siblings when
%% retrieving the bucket policy
riak_cs_s3_response:api_error(E, RD, Ctx);
Expand Down Expand Up @@ -598,8 +598,13 @@ translate_bucket_policy(PolicyMod, Bucket, RiakPid) ->
P;
{error, policy_undefined} ->
undefined;

%% here we are supposed to receive 'multiple_bucket_owners' or
%% 'no_such_bucket' but nothing else. if it comes it's a bug.
{error, multiple_bucket_owners}=Error ->
Error
Error;
{error, no_such_bucket}=Error ->
Error
end.

%% Helper functions for dealing with combinations of Object ACL
Expand Down