From bca97af1a3ef268c7cc2965a8c607b89b47f3851 Mon Sep 17 00:00:00 2001 From: Ashu <11219262+ashutosh16@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:32:45 -0700 Subject: [PATCH] Update util/lua/lua.go Co-authored-by: Alexandre Gaudreault Signed-off-by: Ashu <11219262+ashutosh16@users.noreply.github.com> Update util/lua/lua.go Co-authored-by: Alexandre Gaudreault Signed-off-by: Ashu <11219262+ashutosh16@users.noreply.github.com> --- util/lua/lua.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/lua/lua.go b/util/lua/lua.go index bf14fb8d60d97..ad5ea02c31daa 100644 --- a/util/lua/lua.go +++ b/util/lua/lua.go @@ -298,7 +298,7 @@ func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, scri availableActionsMap := make(map[string]interface{}) err = json.Unmarshal(jsonBytes, &availableActionsMap) if err != nil { - return nil, fmt.Errorf("error in converting to lua table: %w", err) + return nil, fmt.Errorf("error in unmarshaling lua table: %w", err) } for key, value := range availableActionsMap { resourceAction := appv1.ResourceAction{Name: key, Disabled: isActionDisabled(value)} @@ -317,7 +317,7 @@ func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, scri err = json.Unmarshal(resourceActionBytes, &resourceAction) if err != nil { - return nil, fmt.Errorf("error marshaling resource action: %w", err) + return nil, fmt.Errorf("error unmarshaling resource action: %w", err) } availableActions = append(availableActions, resourceAction) }