Skip to content

Commit

Permalink
Return update errors
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Chen <tommy351@gmail.com>
  • Loading branch information
tommy351 committed Apr 29, 2024
1 parent b2477b9 commit bf3091a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/plugin/httproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func (r *RpcPlugin) setHTTPRouteWeight(rollout *v1alpha1.Rollout, desiredWeight
if err != nil {
msg := fmt.Sprintf(GatewayAPIUpdateError, httpRoute.GetName(), err)
r.LogCtx.Error(msg)
return pluginTypes.RpcError{
ErrorString: err.Error(),
}
}
return pluginTypes.RpcError{}
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/plugin/tcproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (r *RpcPlugin) setTCPRouteWeight(rollout *v1alpha1.Rollout, desiredWeight i
if err != nil {
msg := fmt.Sprintf(GatewayAPIUpdateError, tcpRoute.GetName(), err)
r.LogCtx.Error(msg)
return pluginTypes.RpcError{
ErrorString: err.Error(),
}
}
return pluginTypes.RpcError{}
}
Expand Down

0 comments on commit bf3091a

Please sign in to comment.