From 3244f540228f9e49d55ad4b0762436cf1156e03d Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Sat, 22 Aug 2020 05:43:06 +0300 Subject: [PATCH] Change returned error for GetBucketInfo method method should returns gRPC status errors Signed-off-by: Evgeniy Kulikov --- api/layer/layer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/layer/layer.go b/api/layer/layer.go index 5607de15..cc159a42 100644 --- a/api/layer/layer.go +++ b/api/layer/layer.go @@ -143,7 +143,7 @@ func (n *layer) GetBucketInfo(ctx context.Context, name string) (*BucketInfo, er } } - return nil, errors.New("bucket not found") + return nil, status.Error(codes.NotFound, "bucket not found") } // ListBuckets returns all user containers. Name of the bucket is a container