Skip to content

fix: Unintentional nil errors in azuredevops client#5312

Merged
lukemassa merged 1 commit intorunatlantis:mainfrom
lukemassa:fix_errors_in_azuredevops_client
Feb 8, 2025
Merged

fix: Unintentional nil errors in azuredevops client#5312
lukemassa merged 1 commit intorunatlantis:mainfrom
lukemassa:fix_errors_in_azuredevops_client

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 X-Guardian, jamengual and nitrocode 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
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
@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