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

Add build information push error handling #187

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

grace-rehn
Copy link
Contributor

There was no error in the build logs when a user was trying to push build info from ADO to Octopus which failed as they did not have the correct permissions.

This PR includes code to throw an error when the build information push fails.

The following error will be thrown when the user does not have the correct permissions:

Error: You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: BuildInformationPush

@CLAassistant
Copy link

CLAassistant commented Oct 2, 2024

CLA assistant check
All committers have signed the CLA.

@grace-rehn grace-rehn requested a review from hnrkndrssn October 2, 2024 06:06
Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

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

Code looks good, just a small request to make the test clearer on what error we're expecting to get back.

await new BuildInformationRepository(client, space.Name).push(buildInformation);
await new BuildInformationRepository(client, space.Name).push(buildInformation);
} catch (error) {
expect(error).toBeDefined();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a check for the error message returned (similar to what we do in the package repository)

Copy link
Contributor

@hnrkndrssn hnrkndrssn left a comment

Choose a reason for hiding this comment

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

Very nice, good job!

@grace-rehn grace-rehn merged commit f91e29f into main Oct 2, 2024
5 checks passed
@grace-rehn grace-rehn deleted the grace/build-info-error-handling branch October 2, 2024 06:38
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.

3 participants