You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/09/20 01:12:44 UTC
[incubator-devlake] branch main updated: fix: fixed possible panic in the github test connection error handling
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 1f5d065b fix: fixed possible panic in the github test connection error handling
1f5d065b is described below
commit 1f5d065bf3b8cb4d67652c77960fd7fcb114a998
Author: Keon Amini <ke...@merico.dev>
AuthorDate: Mon Sep 19 08:11:48 2022 -0700
fix: fixed possible panic in the github test connection error handling
---
plugins/github/api/connection.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/github/api/connection.go b/plugins/github/api/connection.go
index 973530a1..8ab726e7 100644
--- a/plugins/github/api/connection.go
+++ b/plugins/github/api/connection.go
@@ -81,7 +81,7 @@ func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, erro
}
res, err := apiClient.Get("user", nil, nil)
if err != nil {
- results <- VerifyResult{err: errors.HttpStatus(res.StatusCode).Wrap(err, fmt.Sprintf("verify token failed for #%d %s", j, token))}
+ results <- VerifyResult{err: errors.Default.Wrap(err, fmt.Sprintf("verify token failed for #%d %s", j, token))}
return
}
githubUserOfToken := &models.GithubUserOfToken{}