glanceapp/glance · warning · errPartialContent

%w: could not get %d releases

Error message

%w: could not get %d releases

What it means

Returned by fetchLatestReleases (internal/glance/widget-releases.go:184) when at least one but not all release requests failed (failed > 0 && failed < len(requests)). The widget fetched releases concurrently (20 workers) across GitHub/GitLab/Codeberg/Docker Hub; the surviving releases are still returned alongside this errPartialContent-wrapped error, so the widget renders partially and the error is informational.

Source

Thrown at internal/glance/widget-releases.go:184

	for i := range results {
		if errs[i] != nil {
			failed++
			slog.Error("Failed to fetch release", "source", requests[i].source, "repository", requests[i].Repository, "error", errs[i])
			continue
		}

		releases = append(releases, *results[i])
	}

	if failed == len(requests) {
		return nil, errNoContent
	}

	releases.sortByNewest()

	if failed > 0 {
		return releases, fmt.Errorf("%w: could not get %d releases", errPartialContent, failed)
	}

	return releases, nil
}

func fetchLatestReleaseTask(request *releaseRequest) (*appRelease, error) {
	switch request.source {
	case releaseSourceCodeberg:
		return fetchLatestCodebergRelease(request)
	case releaseSourceGithub:
		return fetchLatestGithubRelease(request)
	case releaseSourceGitlab:
		return fetchLatestGitLabRelease(request)
	case releaseSourceDockerHub:
		return fetchLatestDockerHubRelease(request)
	}

	return nil, errors.New("unsupported source")

View on GitHub (pinned to 91324e8de7)

Solutions

  1. Check Glance's logs: each failed request logs 'Failed to fetch release' with source, repository and the underlying error
  2. Fix the specific repository (correct owner/name spelling, restore deleted repo, use a valid tag)
  3. Configure a GitHub token (environment variable or token: key) to lift the 60 req/hr anonymous limit
  4. If the underlying error is transient (timeout/5xx), wait for the next scheduled widget update
Defensive patterns

Strategy: fallback

Try / catch

releases, err := fetchLatestReleases(reqs)
if err != nil && errors.Is(err, errPartialContent) {
    // render `releases` anyway; log the missing count
}

Prevention

When it happens

Trigger: One or more repositories in the list failing: 404 (typo'd or deleted repo), Docker Hub image with no tags, GitHub rate limit (unauthenticated 60 req/hr), invalid token, network timeout on one source — while at least one other repository succeeds.

Common situations: Large release lists hitting GitHub's unauthenticated rate limit mid-refresh, a renamed/deleted repository left in the config, an expired access-token for one source while others are public, transient network failure to one provider.

Related errors


AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15). Data as JSON: /api/errors/36ad4f83fa9e9abd. Report an issue: GitHub.