mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -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))
|
||||
for _, ref := range col.Refs {
|
||||
fp, empty, _ := ref.NullableFloat64Value()
|
||||
if empty || fp == nil {
|
||||
return nil, fmt.Errorf("unable to read float64 value")
|
||||
fp, empty, err := ref.NullableFloat64Value()
|
||||
if err != nil {
|
||||
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{
|
||||
|
Loading…
Reference in New Issue
Block a user