Skip to content

Commit

Permalink
Prevent panic if DB returns untyped nil timestamp (#5439)
Browse files Browse the repository at this point in the history
  • Loading branch information
begelundmuller authored Aug 13, 2024
1 parent d220a8f commit 118a153
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/queries/metricsview_timeseries.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ func (q *MetricsViewTimeSeries) populateResult(rows *drivers.Result, tsAlias str
case int64:
t = time.UnixMilli(v)
default:
panic(fmt.Sprintf("unexpected type for timestamp column: %T", v))
if v != nil {
panic(fmt.Sprintf("unexpected type for timestamp column: %T", v))
}
}
delete(rowMap, tsAlias)

Expand Down

0 comments on commit 118a153

Please sign in to comment.