ElasticSearch: Fix errorsource in newInstanceSettings (#93859)
This commit is contained in:
1 parent
c2799b4901
commit
76406d65cd
1 file changed
+2
-2
@@ -102,11 +102,11 @@ func newInstanceSettings(httpClientProvider *httpclient.Provider) datasource.Ins
|
||||
|
||||
timeField, ok := jsonData["timeField"].(string)
|
||||
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 == "" {
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user