diff --git a/pkg/plugin/httproute.go b/pkg/plugin/httproute.go index b7e0d1c..b22ff2b 100644 --- a/pkg/plugin/httproute.go +++ b/pkg/plugin/httproute.go @@ -56,8 +56,9 @@ func (r *RpcPlugin) setHTTPRouteWeight(rollout *v1alpha1.Rollout, desiredWeight r.UpdatedHTTPRouteMock = updatedHTTPRoute } if err != nil { - msg := fmt.Sprintf(GatewayAPIUpdateError, httpRoute.GetName(), err) - r.LogCtx.Error(msg) + return pluginTypes.RpcError{ + ErrorString: err.Error(), + } } return pluginTypes.RpcError{} } diff --git a/pkg/plugin/tcproute.go b/pkg/plugin/tcproute.go index 5878c91..996321e 100644 --- a/pkg/plugin/tcproute.go +++ b/pkg/plugin/tcproute.go @@ -3,7 +3,6 @@ package plugin import ( "context" "errors" - "fmt" "github.com/argoproj/argo-rollouts/pkg/apis/rollouts/v1alpha1" pluginTypes "github.com/argoproj/argo-rollouts/utils/plugin/types" @@ -50,8 +49,9 @@ func (r *RpcPlugin) setTCPRouteWeight(rollout *v1alpha1.Rollout, desiredWeight i r.UpdatedTCPRouteMock = updatedTCPRoute } if err != nil { - msg := fmt.Sprintf(GatewayAPIUpdateError, tcpRoute.GetName(), err) - r.LogCtx.Error(msg) + return pluginTypes.RpcError{ + ErrorString: err.Error(), + } } return pluginTypes.RpcError{} }