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

Display HTTP error response to the user #92

Merged
merged 5 commits into from
Apr 15, 2021
Merged

Display HTTP error response to the user #92

merged 5 commits into from
Apr 15, 2021

Conversation

hiddewie
Copy link
Contributor

Fixes #91

This PR logs the (error) response body in the Exception thrown by the plugin whenever a HTTP response fails. This allows the user to fix the problem indicated by the Nexus server.

@szpak
Copy link
Contributor

szpak commented Apr 14, 2021

Thanks @hiddewie . Spotless has some formal objections, but in general it LGTM.

@CRogers
Copy link

CRogers commented Apr 15, 2021

Fantastic - I was about to make my own PR as we're facing the same issue:

java.lang.RuntimeException: Failed to release staging repository, server at https://oss.sonatype.org/service/local/ responded with status code 500, body: io.github.gradlenexus.publishplugin.shadow.okhttp3.ResponseBody$1@7a0c0fab

@hiddewie
Copy link
Contributor Author

Ah yes I messed up the indenting, hopefully fixed.

@szpak
Copy link
Contributor

szpak commented Apr 15, 2021

Running ./gradlew spotlessKotlinCheck sometimes might be faster ;-).

@szpak szpak merged commit 396d9ce into gradle-nexus:master Apr 15, 2021
@szpak
Copy link
Contributor

szpak commented Apr 15, 2021

Thanks again. It will be part of the 1.1.0 release.

@hiddewie
Copy link
Contributor Author

Thanks for the help and the quick feedback!

@hiddewie hiddewie deleted the explicit-error branch April 17, 2021 12:52
@szpak szpak added this to the 1.1.1 milestone Feb 17, 2023
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.

Log explicit response body in case of HTTP errors
3 participants