From da3e349812f29d5b1273f811d3e434edf1a7cb7b Mon Sep 17 00:00:00 2001 From: Doron Cohen Date: Sat, 19 Sep 2020 11:33:31 +0300 Subject: [PATCH] fix: handle action errors --- internal/rules/rule.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/rules/rule.go b/internal/rules/rule.go index f8d55a1..8567684 100644 --- a/internal/rules/rule.go +++ b/internal/rules/rule.go @@ -32,7 +32,11 @@ func (r Rule) Apply() { // TODO: handle errors if !r.Ignore { for _, action := range r.Actions { - action.Apply() + err := action.Apply() + if err != nil { + log.Printf("Failed to run rule %s: %v", r.Name, err) + break + } } } }