I am working on a grpc service using golang, I observed that if there is an rpc error, I get
response = nil
err = some error
even if I am returning a non nil response along with error.
However I also see in my pb.go file:
err := c.cc.Invoke(ctx, "/proto.MyService/Hello", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
If err is not nil , they make the reponse nil, I guess this is the reason why I am getting such response.
I dont think it makes sense to get response when there is an error but still, Is there a way I can get both non-nil response and err from grpc ?