Closed PeterGrace closed 2 years ago
Thanks for opening @PeterGrace.
I've created a test for this in https://github.com/elastic/elasticsearch-rs/tree/bug/183, which passes OK. Based on the error message
error decoding response body: invalid type: null, expected any valid TOML value at line 1 column 161
Is it possible that theValue
type in the response is a toml::value::Value
and not a serde_json::value::Value
?
Is it possible that the
Value
type in the response is atoml::value::Value
and not aserde_json::value::Value
?
Well that's embarrassing! I must have hit the wrong option when I was importing in CLion and accidentally imported the toml Value instead. I was wondering why TOML would even be involved. Sorry for the noise, I'll close this one out.
Describe the bug A call to
response.json().await
fails with error:error decoding response body: invalid type: null, expected any valid TOML value at line 1 column 161
. Upon further inspection, the null value is the response formax_score
, I assume because I'm not actually executing a search that returns values, just an aggregation of data from the search.data returned in the query (gathered by using response.text().await instead):
To Reproduce Steps to reproduce the behavior:
Expected behavior The
response.json().await
call would produce a Value object containing the results of the query.Environment (please complete the following information):