Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[FEATURE] Allow Response Objects and Exceptions to Access Http Response Headers

Aperta
#1,647 9 commenti 3 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@georgereuben ci sta già lavorando.

Dal 8/7/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement
Is your feature request related to a problem?

A clear and concise description of what the problem is, e.g. I'm always frustrated when [...].

I am using the OpenSearchClient with the AwsSdk2Transport, and I cannot retrieve the http headers in the response. This makes it very hard for me to debug issues with my service provider as I cannot provide them request ids.

What solution would you like?

A clear and concise description of what you want to happen.

I would like for two changes:

  1. All response headers should be available on response objects exposed via a method such as getResponseHeaders().
  2. All exceptions thrown because of a response error should also include the http headers from that response. I propose a class: OpenSearchResponseException to encapsulate this behavior.
What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

I could not figure out a way to accomplish this by subclassing and overriding code in this package. I would need to migrate to a RestClient or ApacheHttpClient, implement Sigv4 signing, and do my own response parsing.

Do you have any additional context?

Add any other context or screenshots about the feature request here.

Here looks to be where the response is de-serialized and where headers are lost:

https://github.com/opensearch-project/opensearch-java/blob/main/java-client/src/main/java/org/opensearch/client/transport/aws/AwsSdk2Transport.java#L619-L636

Lingua principale
Java
Stelle
165
Fork
256
Merge medio
19h 9m
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di opensearch-project/opensearch-java

Tutte le issue di opensearch-project/opensearch-java

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.