Check retval value and convert to error in generated RPC client code
[govpp.git] / binapi / urpf / urpf_rpc.ba.go
index 04d4b56..ef10d4b 100644 (file)
@@ -8,7 +8,7 @@ import (
        api "git.fd.io/govpp.git/api"
 )
 
-// RPCService defines RPC service  urpf.
+// RPCService defines RPC service urpf.
 type RPCService interface {
        UrpfUpdate(ctx context.Context, in *UrpfUpdate) (*UrpfUpdateReply, error)
 }
@@ -27,5 +27,5 @@ func (c *serviceClient) UrpfUpdate(ctx context.Context, in *UrpfUpdate) (*UrpfUp
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }