Skip to content

Fix inclusion of the response body in publishing exceptions#4

Merged
harmony7 merged 1 commit into
masterfrom
jkarneges/error-body
Jun 1, 2026
Merged

Fix inclusion of the response body in publishing exceptions#4
harmony7 merged 1 commit into
masterfrom
jkarneges/error-body

Conversation

@jkarneges

Copy link
Copy Markdown
Member

If PubControlClient receives a non-2xx status from the server, it is supposed to throw an exception containing the response body, however the code for this is never reached due to getInputStream() throwing earlier which results in a generic error message. To fix it, this PR calls getErrorStream() for error statuses.

Also, some unnecessary casts are removed.

Tested locally.

@harmony7 harmony7 merged commit 49cb063 into master Jun 1, 2026
@jkarneges jkarneges deleted the jkarneges/error-body branch June 1, 2026 18:10
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.

2 participants