From 735f1dd3fc53f7df2d1b8361f26c927b0273c759 Mon Sep 17 00:00:00 2001 From: Gary Belvin Date: Mon, 29 Apr 2019 12:34:11 -0700 Subject: [PATCH] Update client/log_client.go Co-Authored-By: therealdrake --- client/log_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/log_client.go b/client/log_client.go index 2caf55ef02..d5de4ae544 100644 --- a/client/log_client.go +++ b/client/log_client.go @@ -404,7 +404,7 @@ func (c *LogClient) AddSequencedLeaves(ctx context.Context, dataByIndex map[int6 Leaves: leaves, }) for _, leaf := range resp.GetResults() { - if stat := leaf.GetStatus().GetCode(); stat != int32(codes.OK) && stat != int32(codes.AlreadyExists) { + if s := status.FromProto(leaf.GetStatus()); s.Code() != codes.OK && s.Code() != codes.AlreadyExists { return status.Errorf(s.Code(), "unexpected fail status in AddSequencedLeaves: %+v, err: %v", leaf, s.Message()) } }