Hide position info for warnings when position is unknown (empty query string passed in)

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
pull/13031/head
Jeanette Tan 1 year ago
parent f2e02c52db
commit 72cc93d225

@ -116,6 +116,9 @@ type annoErr struct {
}
func (e annoErr) Error() string {
if e.Query == "" {
return e.Err.Error()
}
return fmt.Sprintf("%s (%s)", e.Err, e.PositionRange.StartPosInput(e.Query, 0))
}

Loading…
Cancel
Save