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

fix: Unintentional nil errors in azuredevops client #5312

Merged

Conversation

lukemassa
Copy link
Contributor

what

Fix some errors in azuredevops that are unintentionally returning nil.

why

Each of these call sites is proceeded by if err != nil { return }, so if we reach these lines of code, we know that err is nil. However, errors.Wrap is documented to return nil if err is nil. https://pkg.go.dev/github.com/pkg/errors#Wrap. This means we are actually returning a nil error in these cases, which is not intentional

tests

Unit tests.

references

Found while working on #5269.
Similar issue to #5294.

@lukemassa lukemassa requested review from a team as code owners February 8, 2025 22:09
@lukemassa lukemassa requested review from jamengual, nitrocode and X-Guardian and removed request for a team February 8, 2025 22:09
@dosubot dosubot bot added bug Something isn't working provider/azuredevops labels Feb 8, 2025
@github-actions github-actions bot added the go Pull requests that update Go code label Feb 8, 2025
@lukemassa lukemassa force-pushed the fix_errors_in_azuredevops_client branch from 65a4959 to 1a01b3e Compare February 8, 2025 22:09
@lukemassa lukemassa changed the title bug: Fix nil errors in azuredevops client fix: Fix nil errors in azuredevops client Feb 8, 2025
@lukemassa lukemassa changed the title fix: Fix nil errors in azuredevops client fix: Unintentional nil errors in azuredevops client Feb 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 8, 2025
@lukemassa lukemassa merged commit 452040f into runatlantis:main Feb 8, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working go Pull requests that update Go code lgtm This PR has been approved by a maintainer provider/azuredevops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants