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
Copy file name to clipboardExpand all lines: docs/release-notes/release-highlights.asciidoc
+20
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,26 @@ For a list of detailed changes, including bug fixes, please see the https://gith
8
8
[discrete]
9
9
==== Version 8.16
10
10
* `ElasticsearchClient` is now `Closeable`. Closing a client object also closes the underlying transport - https://github.com/elastic/elasticsearch-java/pull/851[#851]
11
+
* Added option to make the response body available in case of deserialization error- https://github.com/elastic/elasticsearch-java/pull/886[#886].
12
+
13
+
** While it has always been possible to set the log level to `trace` and have the client print both the json bodies of the requests and responses, it's often not the best solution because of the large amount of information printed.
14
+
** To enable the feature:
15
+
16
+
RestClientOptions options = new RestClientOptions(RequestOptions.DEFAULT, true);
17
+
ElasticsearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper(), options);
18
+
ElasticsearchClient esClientWithOptions = new ElasticsearchClient(transport);
19
+
20
+
** To retrieve the original body from the TransportException that gets thrown in case of deserialization errors:
0 commit comments