Check retval value and convert to error in generated RPC client code
[govpp.git] / binapi / arp / arp_rpc.ba.go
index 8bb64ce..6e60bf3 100644 (file)
@@ -11,7 +11,7 @@ import (
        vpe "git.fd.io/govpp.git/binapi/vpe"
 )
 
-// RPCService defines RPC service  arp.
+// RPCService defines RPC service arp.
 type RPCService interface {
        ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
        ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
@@ -33,7 +33,7 @@ func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel)
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
@@ -120,5 +120,5 @@ func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *Prox
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }