grafana/pkg/tsdb/elasticsearch
Ruud van der Weijde b44df6c8d1
ElasticSearch: Improve ES error handling message (#61471)
Look for 'caused_by.reason' in ES error response

When the ES response does not contain `reason` or `root_cause[0].reason`
is empty, there is no information for the user to know what is going
wrong.

An example of the error message after this change:
```
Failed to evaluate queries and expressions: failed to execute query A: Trying to create too many buckets. Must be less than or equal to: [65536] but this number of buckets was exceeded. This limit can be set by changing the [search.max_buckets] cluster level setting.
```

Related to https://github.com/grafana/grafana/issues/61246
2023-01-20 11:46:31 +01:00
..
client Elasticsearch: Use interval provided by data request in backend (#60480) 2023-01-05 12:26:27 +01:00
testdata Elasticsearch: backend: do not set name for time-fields (#60169) 2022-12-13 13:19:03 +01:00
testdata_request elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
testdata_response elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
elasticsearch_test.go Elasticsearch: Reuse http client in the backend (#55172) 2022-09-26 14:27:46 +02:00
elasticsearch.go Elasticsearch: Use interval provided by data request in backend (#60480) 2023-01-05 12:26:27 +01:00
models.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
parse_query_test.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
parse_query.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
querydata_test.go Elasticsearch: Use interval provided by data request in backend (#60480) 2023-01-05 12:26:27 +01:00
response_parser_frontend_test.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
response_parser_test.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
response_parser.go ElasticSearch: Improve ES error handling message (#61471) 2023-01-20 11:46:31 +01:00
snapshot_test.go Elasticsearch: Add query building for log queries (#60182) 2022-12-14 13:56:09 +01:00
time_series_query_test.go elastic: backend: removed unused time-field (#61362) 2023-01-12 15:52:32 +00:00
time_series_query.go Elasticsearch: Refactor processQuery to make it more readable (#61145) 2023-01-10 10:49:43 +01:00