Skip to content

Commit

Permalink
return proper error
Browse files Browse the repository at this point in the history
  • Loading branch information
kimcore committed Jan 28, 2023
1 parent 6eb8180 commit 37de32e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/packages/util/check-for-update.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"errors"
)

func CheckForUpdate() {
Expand All @@ -25,7 +26,7 @@ func getLatestTag(repoOwner string, repoName string) (string, error) {
return "", err
}
if resp.StatusCode != 200 {
return "", fmt.Sprintf("GitHub API returned status code %d", resp.StatusCode)
return "", errors.New(fmt.Sprintf("GitHub API returned status code %d", resp.StatusCode))
}

defer resp.Body.Close()
Expand Down

0 comments on commit 37de32e

Please sign in to comment.