spicetify/cli · error

GitHub response: {{release.Message}}

Error message

GitHub response: {{release.Message}}

What it means

FetchLatestTag queries the GitHub releases API and unmarshals the JSON into a GithubRelease. If the response has no tag_name, the library assumes GitHub returned an error payload and surfaces the API's message field verbatim in this error. It means the HTTP call succeeded (200) but the body is an API error object rather than a release.

Source

Thrown at src/utils/vcs.go:32

func FetchLatestTag() (string, error) {
	res, err := http.Get("https://api.github.com/repos/spicetify/cli/releases/latest")
	if err != nil {
		return "", err
	}

	body, err := io.ReadAll(res.Body)
	if err != nil {
		return "", err
	}

	var release GithubRelease
	if err = json.Unmarshal(body, &release); err != nil {
		return "", err
	}

	if release.TagName == "" {
		return "", errors.New("GitHub response: " + release.Message)
	}

	return release.TagName[1:], nil
}

View on GitHub (pinned to 1f13f73616)

Solutions

  1. Read the embedded release.Message to see GitHub's actual reason (e.g. Not Found vs rate limit).
  2. If rate limited, set a GITHUB_TOKEN or wait for the rate-limit window to reset.
  3. Verify the repository/owner in the request URL still exists and has published releases.
  4. Retry later if GitHub is having an incident.

Example fix

// before
tag, err := utils.FetchLatestTag()
// after
tag, err := utils.FetchLatestTag()
if err != nil && strings.Contains(err.Error(), "API rate limit") {
    // retry with authenticated client or later
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Check quota before calling
resp, _ := http.Get("https://api.github.com/rate_limit")
// parse resources.core.remaining; if 0, wait before FetchLatestTag

Try / catch

tag, err := utils.FetchLatestTag()
if err != nil {
    if strings.Contains(err.Error(), "API rate limit") {
        // back off / authenticate
    } else if strings.Contains(err.Error(), "Not Found") {
        // repo has no releases
    }
    return err
}

Prevention

When it happens

Trigger: Calling FetchLatestTag against a repository with no releases, or hitting rate limits / bad tokens where GitHub returns 200-family or JSON bodies containing message but no tag_name.

Common situations: GitHub API rate limiting from CI (unauthenticated requests exhausted); renamed/moved upstream repo; running a fork with no releases published; corporate proxy returning a JSON error page.

Related errors


AI-assisted analysis of spicetify/cli@1f13f73616 (2026-08-31). Data as JSON: /api/errors/6ec05fde8e1acc0f. Report an issue: GitHub.