Skip to content

Commit 60c5031

Browse files
committed
fix: errors.As
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 7ad493b commit 60c5031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/clusterctl/client/repository/repository_github.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var (
6161
retryableOperationTimeout = 1 * time.Minute
6262
)
6363

64-
var rateLimitError github.RateLimitError
64+
var rateLimitError *github.RateLimitError
6565

6666
// gitHubRepository provides support for providers hosted on GitHub.
6767
//
@@ -506,7 +506,7 @@ func (g *gitHubRepository) handleGithubErr(err error, message string, args ...in
506506
return errors.New("rate limit for github api has been reached. Please wait one hour or get a personal API token and assign it to the GITHUB_TOKEN environment variable")
507507
}
508508

509-
var errorResponse github.ErrorResponse
509+
var errorResponse *github.ErrorResponse
510510
if errors.As(err, &errorResponse) {
511511
ghErr := err.(*github.ErrorResponse)
512512
if ghErr.Response.StatusCode == http.StatusNotFound {

0 commit comments

Comments
 (0)