You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered while working on #155. When the R client receives an error from ES (a non-2xx response code), currently the code fails with an error just like "error: 404" or something like that.
I think it would be valuable to instead have uptasticsearch trap non-2xx response codes and then log out the full content of the error message from Elasticsearch.
For example, before fixing #155 I found that running this code
INFO [2019-08-21 22:35:37] es_search detected that this is an aggs request and will only return aggregation results.
Request failed [400]. Retrying in 1 seconds...
Request failed [400]. Retrying in 1 seconds...
Error in .search_request(es_host = es_host, es_index = es_index, trailing_args = "size=0", :
Bad Request (HTTP 400).
HTTP/1.1 400 Bad Request
content-type: application/json; charset=UTF-8
content-length: 1442
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [speaker] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"shakespeare","node":"FXsoOzioR_CZqUSQMsWmAg","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [speaker] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [speaker] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [speaker] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}},"status":400}
The text was updated successfully, but these errors were encountered:
Discovered while working on #155. When the R client receives an error from ES (a non-2xx response code), currently the code fails with an error just like
"error: 404"
or something like that.I think it would be valuable to instead have
uptasticsearch
trap non-2xx response codes and then log out the full content of the error message from Elasticsearch.For example, before fixing #155 I found that running this code
returns
Where the same curl request
returns the much more informative error
The text was updated successfully, but these errors were encountered: