opensearch-java
opensearch-java copied to clipboard
[BUG] ResponseException binary response is parsed as string
When requesting binary response data:
optionsBuilder.addHeader("Accept", "application/cbor");
Any ResponseException will be read as a string instead of the requested format.
This leads to malformed error messages, such as:
org.opensearch.client.ResponseException: method [POST], host [http://localhost:9200], URI [/index/_search], status line [HTTP/1.1 400 Bad Request] ¿eerror¿jroot_cause¿dtypeqparsing_exceptionfreasonx_unknown query[...]
@timlueg Could you please give a more complete example of what you're trying to achieve?