Fix null body for http error responses#3824
Open
simon-lgb wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3824 +/- ##
=============================================
- Coverage 60.64% 60.63% -0.00%
Complexity 105 105
=============================================
Files 3482 3482
Lines 152033 152034 +1
Branches 11616 11617 +1
=============================================
Hits 92178 92178
Misses 56384 56384
- Partials 3471 3472 +1 🚀 New features to boost your workflow:
|
simon-lgb
force-pushed
the
fix/http-error-body
branch
from
July 16, 2026 10:21
07320d1 to
47095fb
Compare
Contributor
Author
|
Rebased onto the changes in #3825 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the body of http error responses always being null in the http bridge.
The behavior is not documented clearly, but getInputStream() always throws an IOException when the server returned an error response. If a body was still sent, getErrorStream() has to be called to read it.
The error stream can be null, so an additional check was added for this. Any remaining IOExceptions thrown when attempting to read the body will now cause an UnknownError instead of a ResponseError.