glanceapp/glance · warning · errPartialContent
%w: could not get commits: %s
Error message
%w: could not get commits: %s
What it means
Returned by fetchRepositoryDetailsFromGithub (internal/glance/widget-repository.go:224) when the optional commit listing (commits-to-show > 0) failed while core details succeeded; errPartialContent wrap, widget renders without the commit list. Data comes from GET /repos/{repo}/commits?per_page=N, which shares the core REST API quota (60/hr unauthenticated, 5000/hr with token) rather than the search quota.
Source
Thrown at internal/glance/widget-repository.go:224
if issuesErr != nil {
// TODO: fix, overwriting the previous error
err = fmt.Errorf("%w: could not get issues: %s", errPartialContent, issuesErr)
} else {
details.OpenIssues = issuesResponse.Count
for i := range issuesResponse.Tickets {
details.Issues = append(details.Issues, githubTicket{
Number: issuesResponse.Tickets[i].Number,
CreatedAt: parseRFC3339Time(issuesResponse.Tickets[i].CreatedAt),
Title: issuesResponse.Tickets[i].Title,
})
}
}
}
if maxCommits > 0 {
if CommitsErr != nil {
err = fmt.Errorf("%w: could not get commits: %s", errPartialContent, CommitsErr)
} else {
for i := range commitsResponse {
details.Commits = append(details.Commits, githubCommitDetails{
Sha: commitsResponse[i].Sha,
Author: commitsResponse[i].Commit.Author.Name,
CreatedAt: parseRFC3339Time(commitsResponse[i].Commit.Author.Date),
Message: strings.SplitN(commitsResponse[i].Commit.Message, "\n\n", 2)[0],
})
}
}
}
return details, err
}
View on GitHub (pinned to 91324e8de7)
Solutions
- Configure a GitHub token to lift the rate limit
- Raise the page cache-time / widget update interval
- Drop commits-to-show to 0 if the commit list is optional for you
- Check the wrapped %s to confirm rate limiting vs network error
Defensive patterns
Strategy: retry
Try / catch
if err != nil && errors.Is(err, errPartialContent) && strings.Contains(err.Error(), "could not get commits") {
// core data rendered; commit list omitted; retry on next cycle
} Prevention
- GitHub token lifts the core REST quota that this call shares
- Trim commits-to-show if the list is optional
- Distinguish this from search-quota failures (131/132)
When it happens
Trigger: Core REST API rate limit hit only on the commits call (e.g., quota exhausted between the details call and this one); network error on the commits goroutine; repo with a non-standard default branch response that fails JSON decode.
Common situations: Multiple repository widgets refreshing near-simultaneously exhausting the anonymous quota; flaky egress; heavy commit-to-show values increasing payload decode failure odds on truncated responses.
Related errors
- %w: could not get PRs: %s
- %w: could not get issues: %s
- %w: could not get repository details: %s
- %w: could not fetch data for %d market(s)
- %w: could not get %d releases
AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15).
Data as JSON: /api/errors/d35b7688c893d827.
Report an issue: GitHub.