Skip to content

Commit

Permalink
Merge pull request #5 from kununu/fix-auth
Browse files Browse the repository at this point in the history
Fix authentication when receiving different status codes
  • Loading branch information
enkodr committed Apr 4, 2023
2 parents 3917413 + 9c81a14 commit 0dd6856
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (ghApp *GitHubApp) GetAccessToken() (string, error) {
return "", err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
if resp.StatusCode >= 400 {
return "", errors.New("couldn't get the token")
}

Expand Down

0 comments on commit 0dd6856

Please sign in to comment.