fix error handling

This commit is contained in:
yugo kobayashi
2022-08-26 14:38:51 +00:00
parent f086269d6e
commit a54226e0a9
5 changed files with 12 additions and 9 deletions

View File

@@ -310,7 +310,7 @@ func (r RunFns) getFunctionFilters(global bool, fns ...*yaml.RNode) (
api := fns[i]
spec, err := runtimeutil.GetFunctionSpec(api)
if err != nil {
return nil, fmt.Errorf("%w", err)
return nil, fmt.Errorf("failed to get FunctionSpec: %w", err)
}
if spec == nil {
// resource doesn't have function spec