Skip to content

Commit 93ea22e

Browse files
Update plugin.go
1 parent 5ff55ed commit 93ea22e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,8 @@ func GetLatestTaskID(sonarHost string, projectSlug string) (string, error) {
10331033
}
10341034

10351035
// If Forbidden, try with Basic Auth
1036-
if taskResponse.StatusCode == http.StatusForbidden {
1036+
// if taskResponse.StatusCode == http.StatusForbidden {
1037+
if taskResponse.StatusCode != http.StatusOK {
10371038
fmt.Printf("\nRetrying with Basic Auth...\n")
10381039
addBasicAuth(taskRequest, sonarToken)
10391040
taskResponse, err = netClient.Do(taskRequest)

0 commit comments

Comments
 (0)