-
Notifications
You must be signed in to change notification settings - Fork 208
Description
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:
- All response headers should be available on response objects exposed via a method such as
getResponseHeaders()
. - 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: