Skip to content

Fix inclusion of the response body in publishing exceptions#4

Open
jkarneges wants to merge 1 commit into
masterfrom
jkarneges/error-body
Open

Fix inclusion of the response body in publishing exceptions#4
jkarneges wants to merge 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.

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