From 9c81a1472f47693df21fbd8549afed0a15809520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20S=C3=A1?= Date: Tue, 4 Apr 2023 15:27:11 +0100 Subject: [PATCH] Fix authentication when receiving different status codes --- auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.go b/auth.go index 0776565..42c1ad2 100644 --- a/auth.go +++ b/auth.go @@ -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") }