From a3c6add846cd7c9131c34e760980f54c127abd83 Mon Sep 17 00:00:00 2001 From: Xi Chen Date: Thu, 12 Oct 2017 11:38:55 -0400 Subject: [PATCH] More descriptive error message --- rules/validator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/validator.go b/rules/validator.go index d8534f4..848ac13 100644 --- a/rules/validator.go +++ b/rules/validator.go @@ -83,7 +83,7 @@ func (v *validator) validateMappingRules(mrv map[string]*MappingRuleView) error return err } if len(types) == 0 { - return fmt.Errorf("mapping rule %s does not match any allowed metric types", view.Name) + return fmt.Errorf("mapping rule %s does not match any allowed metric types, filter=%v", view.Name, view.Filters) } // Validate that the policies are valid. @@ -121,7 +121,7 @@ func (v *validator) validateRollupRules(rrv map[string]*RollupRuleView) error { return err } if len(types) == 0 { - return fmt.Errorf("rollup rule %s does not match any allowed metric types", view.Name) + return fmt.Errorf("rollup rule %s does not match any allowed metric types, filter=%v", view.Name, view.Filters) } // Validate that the policies are valid.