Skip to content

Commit

Permalink
better errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated committed May 17, 2023
1 parent 784a9dd commit 875d0b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func GetGithubRelease(url, fallbackUrl string) (*GithubRelease, error) {
// GitHub has a very strict 60 req/h rate limit and some (mostly indian) isps block github for some reason.
// If that is the case, try our fallback at https://vencord.dev/releases/project
if isRateLimitedOrBlocked && !triedFallback {
fmt.Println("Failed to fetch " + url + ". Trying fallback url " + fallbackUrl)
fmt.Printf("Failed to fetch %s (status code %d). Trying fallback url %s\n", url, res.StatusCode, fallbackUrl)
return GetGithubRelease(fallbackUrl, fallbackUrl)
}

err = errors.New(res.Status)
fmt.Println("GitHub Api returned Non-OK status", GithubError)
fmt.Println(url, "returned Non-OK status", GithubError)
return nil, err
}

Expand Down

0 comments on commit 875d0b7

Please sign in to comment.