Check retval value and convert to error in generated RPC client code
[govpp.git] / binapi / oddbuf / oddbuf_rpc.ba.go
index 93ccf3b..f7c0164 100644 (file)
@@ -8,7 +8,7 @@ import (
        api "git.fd.io/govpp.git/api"
 )
 
-// RPCService defines RPC service  oddbuf.
+// RPCService defines RPC service oddbuf.
 type RPCService interface {
        OddbufEnableDisable(ctx context.Context, in *OddbufEnableDisable) (*OddbufEnableDisableReply, error)
 }
@@ -27,5 +27,5 @@ func (c *serviceClient) OddbufEnableDisable(ctx context.Context, in *OddbufEnabl
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }