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

fix: consume response entity on response processing failure #1553

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

geminicaprograms
Copy link

Issue:
When exception is thrown during the response entity processing it may or may not be consumed and as a result the following warning is being displayed to the console:

  Response entity was not subscribed after 1 second. Make sure to read the response `entity` body or call `entity.discardBytes()` on it -- in case you deal with `HttpResponse`, use the shortcut `response.discardEntityBytes()`

Solution:
Add handler that takes care of exhausting the response entity when exception is thrown during the response processing.

Notes:

  • the original processing exception is propagated
  • in case when exception is thrown while the response entity is consumed the original processing exception is propagated

Closes #1450

Issue:
When exception is thrown during the response entity processing it may or
may not be consumed and as a result the following warning is being
displayed in the console:

  Response entity was not subscribed after 1 second. Make sure to read the response `entity` body or call `entity.discardBytes()` on it -- in case you deal with `HttpResponse`, use the shortcut `response.discardEntityBytes()`

Solution:
Add handler that takes care of exhausting the response entity when
exception is thrown during the response processing.

Notes:
* the original processing exception is propagated
* in case when exception is thrown while the response entity is consumed
  the original processing exception is propagated

Closes #1450
@adamw adamw merged commit 47b38a2 into master Sep 8, 2022
@mergify mergify bot deleted the fix/consume_response_on_failure branch September 8, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants