Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ResponseException binary response is parsed as string #1156

Open
timlueg opened this issue Aug 26, 2024 · 1 comment
Open

[BUG] ResponseException binary response is parsed as string #1156

timlueg opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@timlueg
Copy link

timlueg commented Aug 26, 2024

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 timlueg added bug Something isn't working untriaged labels Aug 26, 2024
@Xtansia Xtansia removed the untriaged label Aug 28, 2024
@Xtansia
Copy link
Collaborator

Xtansia commented Aug 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants