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

feat: improve output in case of errors during publish #712

Merged
merged 2 commits into from May 8, 2024

Conversation

fgreinacher
Copy link
Contributor

This PR adds the message from the response body to the error if available.

Resolves #684

"PRIVATE-TOKEN": gitlabToken,
},
hooks: {
beforeError: [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (response?.body && response.headers["content-type"] === "application/json") {
const parsedBody = JSON.parse(response.body);
if (parsedBody.message) {
error.message = `Response code ${response.statusCode} (${parsedBody.message})`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fgreinacher fgreinacher requested a review from travi May 7, 2024 14:44
@fgreinacher fgreinacher marked this pull request as ready for review May 7, 2024 14:44
@fgreinacher fgreinacher merged commit 93c6015 into master May 8, 2024
14 checks passed
@fgreinacher fgreinacher deleted the feat/improve-error-output branch May 8, 2024 06:11
Copy link

github-actions bot commented May 8, 2024

🎉 This PR is included in version 13.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Catch error "Project must have a description" when creating a release.
2 participants