Skip to content

Commit d75a32f

Browse files
committed
fix: errors.As
Signed-off-by: sivchari <shibuuuu5@gmail.com>
1 parent 11dd6c7 commit d75a32f

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
//
@@ -505,7 +505,7 @@ func (g *gitHubRepository) handleGithubErr(err error, message string, args ...in
505505
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")
506506
}
507507

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

0 commit comments

Comments
 (0)