diff --git a/verifier/rules.go b/verifier/rules.go index cac2ebb..1d1f053 100644 --- a/verifier/rules.go +++ b/verifier/rules.go @@ -142,10 +142,13 @@ func applyAttributeRules(env *cel.Env, input interpreter.Activation, rules []Con switch result := out.Value().(type) { case bool: if !result { - message := fmt.Sprintf("verification failed for rule '%s'", r.Rule) + var message string if r.Debug != "" { message = fmt.Sprintf("%s\nin rule '%s'", r.Debug, r.Rule) + } else { + message = fmt.Sprintf("verification failed for rule '%s'", r.Rule) } + if !r.Warn { return fmt.Errorf(message) }