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