Skip to content

Commit 92c8520

Browse files
authored
Merge pull request #49 from crosbymichael/status
Handle ok status
2 parents 9abb3e2 + 0e0f228 commit 92c8520

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/gogo/protobuf/proto"
3030
"github.com/pkg/errors"
3131
"github.com/sirupsen/logrus"
32+
"google.golang.org/grpc/codes"
3233
"google.golang.org/grpc/status"
3334
)
3435

@@ -134,10 +135,9 @@ func (c *Client) Call(ctx context.Context, service, method string, req, resp int
134135
return err
135136
}
136137

137-
if cresp.Status != nil {
138+
if cresp.Status != nil && cresp.Status.Code != int32(codes.OK) {
138139
return status.ErrorProto(cresp.Status)
139140
}
140-
141141
return nil
142142
}
143143

0 commit comments

Comments
 (0)