mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2026-01-31 16:21:46 +01:00
Handle the metric/host not found case differently
This commit is contained in:
@@ -699,7 +699,7 @@ func (m *MemoryStore) Read(selector util.Selector, metric string, from, to, reso
|
||||
if err != nil {
|
||||
return nil, 0, 0, 0, err
|
||||
} else if n == 0 {
|
||||
return nil, 0, 0, 0, errors.New("[METRICSTORE]> metric or host not found")
|
||||
return nil, 0, 0, 0, ErrNoHostOrMetric
|
||||
} else if n > 1 {
|
||||
if minfo.Aggregation == AvgAggregation {
|
||||
normalize := 1. / schema.Float(n)
|
||||
|
||||
Reference in New Issue
Block a user