nektos/act · error

%s%w

Error message

%s%w

What it means

Wrapper from Node.checkExpression (schema.go:224) that prefixes a location (Line/Column) onto a semantic validation error (%w) produced by checkSingleExpression for a successfully-parsed expression. Itself not a distinct failure — it decorates errors 181-185 with YAML position info.

Source

Thrown at pkg/schema/schema.go:224

	for {
		if i := strings.Index(val, "${{"); i != -1 {
			val = val[i+3:]
		} else {
			return hadExpr, err
		}
		hadExpr = true

		parser := actionlint.NewExprParser()
		lexer := actionlint.NewExprLexer(val)
		exprNode, parseErr := parser.Parse(lexer)
		if parseErr != nil {
			err = errors.Join(err, fmt.Errorf("%sFailed to parse: %s", formatLocation(node), parseErr.Message))
			continue
		}
		val = val[lexer.Offset():]
		cerr := s.checkSingleExpression(exprNode)
		if cerr != nil {
			err = errors.Join(err, fmt.Errorf("%s%w", formatLocation(node), cerr))
		}
	}
}

func AddFunction(funcs *[]FunctionInfo, s string, i1, i2 int) {
	*funcs = append(*funcs, FunctionInfo{
		name: s,
		min:  i1,
		max:  i2,
	})
}

func (s *Node) UnmarshalYAML(node *yaml.Node) error {
	if node != nil && node.Kind == yaml.DocumentNode {
		return s.UnmarshalYAML(node.Content[0])
	}
	def := s.Schema.GetDefinition(s.Definition)
	if s.Context == nil {

View on GitHub (pinned to 4f41128141)

Solutions

  1. Read the suffixed error (e.g. 'Unknown Function Call xyz') and fix that root cause
  2. Use the reported Line/Column to jump to the exact YAML node
  3. Re-run schema validation after each fix; multiple joined errors are reported together
Defensive patterns

Strategy: validation

Try / catch

Unwrap with errors.Unwrap/errors.Join iteration to reach the semantic cause; fix that, not the wrapper.

Prevention

When it happens

Trigger: Any of the checkSingleExpression failures (unknown function, unknown variable, arity mismatch, non-literal in no-context node) found in an interpolated ${{ }} value during schema validation.

Common situations: See the underlying error text after the location prefix; the fix targets the semantic problem, not this wrapper.

Related errors


AI-assisted analysis of nektos/act@4f41128141 (2026-08-15). Data as JSON: /api/errors/59e268cce3f4df27. Report an issue: GitHub.