Skip to content

Commit

Permalink
fix: handle action errors
Browse files Browse the repository at this point in the history
  • Loading branch information
doron-cohen committed Sep 19, 2020
1 parent a291c13 commit da3e349
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/rules/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
Expand Down

0 comments on commit da3e349

Please sign in to comment.