Skip to content

Fix null body for http error responses#3824

Open
simon-lgb wants to merge 1 commit into
OpenEMS:developfrom
ses-systeme:fix/http-error-body
Open

Fix null body for http error responses#3824
simon-lgb wants to merge 1 commit into
OpenEMS:developfrom
ses-systeme:fix/http-error-body

Conversation

@simon-lgb

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@simon-lgb
simon-lgb force-pushed the fix/http-error-body branch from 07320d1 to 47095fb Compare July 16, 2026 10:21
@simon-lgb

Copy link
Copy Markdown
Contributor Author

Rebased onto the changes in #3825

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant