Allow users to obtain HTTP response headers during error conditions when using lambda-powertools-http-client.
There are two error conditions that I've come across where I no longer have access to the HTTP response headers.
Parsing errors caused by malformed JSON in a response body. I think the behavior for this specific case can be generalize to include many errors thrown while handling the response.
HTTP errors of the 3xx, 4xx, and 5xx variety.
This case appears to be handled by this line. While the headers are available at this point, they don't appear to be included in the error thrown from the library.
This is a Feature Proposal
Description
lambda-powertools-http-client
.There are two error conditions that I've come across where I no longer have access to the HTTP response headers.
Parsing errors caused by malformed JSON in a response body. I think the behavior for this specific case can be generalize to include many errors thrown while handling the response.
HTTP errors of the 3xx, 4xx, and 5xx variety. This case appears to be handled by this line. While the headers are available at this point, they don't appear to be included in the error thrown from the library.
Similar or dependent issues: None