Skip to content

Commit

Permalink
fix: Unintentional nil errors in azuredevops client (#5312)
Browse files Browse the repository at this point in the history
Signed-off-by: Luke Massa <[email protected]>
  • Loading branch information
lukemassa authored Feb 8, 2025
1 parent e1dcc44 commit 452040f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/events/vcs/azuredevops_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (g *AzureDevopsClient) UpdateStatus(logger logging.SimpleLogging, repo mode
return errors.Wrap(err, "getting pull request")
}
if resp.StatusCode != http.StatusOK {
return errors.Wrapf(err, "http response code %d getting pull request", resp.StatusCode)
return errors.Errorf("http response code %d getting pull request", resp.StatusCode)
}
if source.GetSupportsIterations() {
opts := azuredevops.PullRequestIterationsListOptions{}
Expand All @@ -276,7 +276,7 @@ func (g *AzureDevopsClient) UpdateStatus(logger logging.SimpleLogging, repo mode
return errors.Wrap(err, "listing pull request iterations")
}
if resp.StatusCode != http.StatusOK {
return errors.Wrapf(err, "http response code %d listing pull request iterations", resp.StatusCode)
return errors.Errorf("http response code %d listing pull request iterations", resp.StatusCode)
}
for _, iteration := range iterations {
if sourceRef := iteration.GetSourceRefCommit(); sourceRef != nil {
Expand All @@ -297,7 +297,7 @@ func (g *AzureDevopsClient) UpdateStatus(logger logging.SimpleLogging, repo mode
return errors.Wrap(err, "creating pull request status")
}
if resp.StatusCode != http.StatusOK {
return errors.Wrapf(err, "http response code %d creating pull request status", resp.StatusCode)
return errors.Errorf("http response code %d creating pull request status", resp.StatusCode)
}
return err
}
Expand Down

0 comments on commit 452040f

Please sign in to comment.