Skip to content

Commit

Permalink
Log eval error after evaluation
Browse files Browse the repository at this point in the history
This got moved during refactoring and it needs to be set before the
actions take place.
  • Loading branch information
dmjb committed Jun 17, 2024
1 parent 81fe44f commit b38bc6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/engine/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ func (e *Executor) evalEntityEvent(ctx context.Context, inf *entities.EntityInfo

// Evaluate the rule
evalErr := ruleEngine.Eval(ctx, inf, evalParams)
evalParams.SetEvalErr(evalErr)

// Perform actions, if any
actionsErr := actions.DoActions(ctx, inf.Entity, evalParams)

// Log the evaluation
evalParams.SetEvalErr(evalErr)
evalParams.SetActionsErr(ctx, actionsErr)
logEval(ctx, inf, evalParams)

Expand Down

0 comments on commit b38bc6a

Please sign in to comment.