opensearch-java icon indicating copy to clipboard operation
opensearch-java copied to clipboard

[BUG] ResponseException binary response is parsed as string

Open timlueg opened this issue 1 year ago • 1 comments

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 avatar Aug 26 '24 10:08 timlueg

@timlueg Could you please give a more complete example of what you're trying to achieve?

Xtansia avatar Aug 28 '24 00:08 Xtansia