From a82043d09095539a8548c2591c9c578c61d4b9c3 Mon Sep 17 00:00:00 2001 From: Joe Caswell Date: Wed, 24 Feb 2016 10:30:29 -0800 Subject: [PATCH] log the missing bucket type name when returning {error, no_type} --- src/riak_core_bucket.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/riak_core_bucket.erl b/src/riak_core_bucket.erl index 3e11741d7..af19f618d 100644 --- a/src/riak_core_bucket.erl +++ b/src/riak_core_bucket.erl @@ -1,4 +1,4 @@ -%% ------------------------------------------------------------------- +g% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% @@ -65,7 +65,9 @@ set_bucket({<<"default">>, Name}, BucketProps) -> set_bucket(Name, BucketProps); set_bucket({Type, _Name}=Bucket, BucketProps0) -> case riak_core_bucket_type:get(Type) of - undefined -> {error, no_type}; + undefined -> + lager:error("Attempt to set properties of non-existant bucket type ~p", [Bucket]), + {error, no_type}; _ -> set_bucket(fun set_bucket_in_metadata/2, Bucket, BucketProps0) end; set_bucket(Name, BucketProps0) -> @@ -118,7 +120,9 @@ get_bucket({Type, _Name}=Bucket) -> BucketMeta = riak_core_metadata:get(?METADATA_PREFIX, bucket_key(Bucket), [{resolver, fun riak_core_bucket_props:resolve/2}]), case merge_type_props(TypeMeta, BucketMeta) of - {error, _}=Error -> Error; + {error, _}=Error -> + lager:error("~p getting properties of bucket ~p",[Error,Bucket]), + Error; Props -> [{name, Bucket} | Props] end; get_bucket(Name) ->