Skip to content

Commit

Permalink
OPCT-317: skip error msg when optional metric is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
mtulio committed Feb 5, 2025
1 parent 48961e1 commit f354089
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/openshift/mustgathermetrics/plotly.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ func (cpp *ChartPagePlotly) RenderPage() error {
indexChartsMap := []map[string]string{}
validDivIds := []string{}
for k := range cpp.Charts {
err := cpp.processMetricV2(k)
if err != nil {
log.Error(err)
if err := cpp.processMetricV2(k); err != nil {
log.Debug(err)
continue
}
if cpp.Charts[k].DivId != "" {
Expand Down Expand Up @@ -213,7 +212,7 @@ func (cpp *ChartPagePlotly) processMetricV2(name string) error {
}

if len(data) == 0 {
return fmt.Errorf("no valid data for metric %s", name)
return fmt.Errorf("Error processing metric: no valid data for %q", name)

Check failure on line 215 in internal/openshift/mustgathermetrics/plotly.go

View workflow job for this annotation

GitHub Actions / linters / go_static

error strings should not be capitalized (ST1005)
}

// create table with rows by label
Expand Down

0 comments on commit f354089

Please sign in to comment.