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

Make a way to read HttpResponse content in HttpUnsuccessfulResponseHandler #1410

Closed
klya opened this issue Jul 12, 2021 · 0 comments · Fixed by #1411
Closed

Make a way to read HttpResponse content in HttpUnsuccessfulResponseHandler #1410

klya opened this issue Jul 12, 2021 · 0 comments · Fixed by #1411
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@klya
Copy link

klya commented Jul 12, 2021

Google API uses the 403 HttpStatus for a variety of errors . To inspect the original error source you need to read HttpResponse content. But there is no way to do it in HttpUnsuccessfulResponseHandler and trigger ExponentialBackOff.

If you read HttpResponse.getContent() and decide not to process retry, the regular exception builder will cause IOException.

Here is the similar issue: #1403.

I suggest making HttpResponse.getContent() buffered in order to restore it's original state using mark()/reset().

@Neenu1995 Neenu1995 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants