mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ElasticSearch: Fix errorsource in newInstanceSettings (#93859)
This commit is contained in:
@@ -102,11 +102,11 @@ func newInstanceSettings(httpClientProvider *httpclient.Provider) datasource.Ins
|
|||||||
|
|
||||||
timeField, ok := jsonData["timeField"].(string)
|
timeField, ok := jsonData["timeField"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, errors.New("timeField cannot be cast to string")
|
return nil, exp.DownstreamError(errors.New("timeField cannot be cast to string"), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if timeField == "" {
|
if timeField == "" {
|
||||||
return nil, errors.New("elasticsearch time field name is required")
|
return nil, exp.DownstreamError(errors.New("elasticsearch time field name is required"), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
logLevelField, ok := jsonData["logLevelField"].(string)
|
logLevelField, ok := jsonData["logLevelField"].(string)
|
||||||
|
|||||||
Reference in New Issue
Block a user