diff --git a/automation/service/trigger.go b/automation/service/trigger.go index 5731fade1..1c2f82445 100644 --- a/automation/service/trigger.go +++ b/automation/service/trigger.go @@ -485,12 +485,12 @@ func (svc *trigger) registerTriggers(wf *types.Workflow, runAs auth.Identifiable if g == nil { handlerFn = func(_ context.Context, ev eventbus.Event) error { return errors.Internal( - "trigger %s on %s failed due to invalid workflow %d: %w", + "trigger %s on %s failed due to invalid workflow %d: %s", ev.EventType(), ev.ResourceType(), wf.ID, wf.Issues, - ) + ).Wrap(wf.Issues) } } else { handlerFn = makeWorkflowHandler(svc.session, t, wf, g, runAs) diff --git a/automation/service/workflow_converter.go b/automation/service/workflow_converter.go index c2c4aad88..563fcbc86 100644 --- a/automation/service/workflow_converter.go +++ b/automation/service/workflow_converter.go @@ -511,12 +511,13 @@ func verifyStep(s *types.WorkflowStep, in, out types.WorkflowPathSet) types.Work return nil } + requiredArg = func(argName string, typ expr.Type) func() error { return func() error { if msgArg := types.ExprSet(s.Arguments).GetByTarget(argName); msgArg == nil { - return errors.Internal("%s step expects to have '%s' argument", argName) + return errors.Internal("%s step expects to have '%s' argument", s.Kind, argName) } else if msgArg.Type != typ.Type() { - return errors.Internal("%s argument on error step must be string, got type '%s'", argName, msgArg.Type) + return errors.Internal("%s argument on %s step must be %s, got type '%s'", argName, s.Kind, typ.Type(), msgArg.Type) } return nil