From 77bdb0f795ef27dfb8eca29a5770a07d4b3adfcc Mon Sep 17 00:00:00 2001 From: DanB Date: Fri, 21 Oct 2016 20:23:14 +0200 Subject: [PATCH] Fix panic for reader when no action plan found --- engine/tp_reader.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/tp_reader.go b/engine/tp_reader.go index 2be189a89..b891d6d76 100644 --- a/engine/tp_reader.go +++ b/engine/tp_reader.go @@ -1148,8 +1148,7 @@ func (tpr *TpReader) LoadAccountActions() (err error) { if aa.ActionPlanId != "" { actionPlan, exists := tpr.actionPlans[aa.ActionPlanId] if !exists { - log.Printf("could not get action plan for tag %v", aa.ActionPlanId) - // must not continue here + return fmt.Errorf("could not get action plan for tag %v", aa.ActionPlanId) } if actionPlan.AccountIDs == nil { actionPlan.AccountIDs = make(utils.StringMap)