Change returned error for GetBucketInfo method

method should returns gRPC status errors

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
Evgeniy Kulikov 2020-08-22 05:43:06 +03:00
parent 8eff7d4dd3
commit 3244f54022

View file

@ -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