mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Don't suppress translation errors in PointsFromFrames (#93747)
* don't suppress error * reorder * re-add nilcheck
This commit is contained in:
parent
acb051b314
commit
378d92130d
@ -66,9 +66,15 @@ func PointsFromFrames(name string, t time.Time, frames data.Frames, extraLabels
|
|||||||
|
|
||||||
points := make([]Point, 0, len(col.Refs))
|
points := make([]Point, 0, len(col.Refs))
|
||||||
for _, ref := range col.Refs {
|
for _, ref := range col.Refs {
|
||||||
fp, empty, _ := ref.NullableFloat64Value()
|
fp, empty, err := ref.NullableFloat64Value()
|
||||||
if empty || fp == nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to read float64 value")
|
return nil, fmt.Errorf("unable to read float64 value: %w", err)
|
||||||
|
}
|
||||||
|
if empty {
|
||||||
|
return nil, fmt.Errorf("empty frame")
|
||||||
|
}
|
||||||
|
if fp == nil {
|
||||||
|
return nil, fmt.Errorf("nil frame")
|
||||||
}
|
}
|
||||||
|
|
||||||
metric := Metric{
|
metric := Metric{
|
||||||
|
Loading…
Reference in New Issue
Block a user