Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
More descriptive error message
Browse files Browse the repository at this point in the history
  • Loading branch information
xichen2020 committed Oct 12, 2017
1 parent 47413a1 commit a3c6add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rules/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit a3c6add

Please sign in to comment.