glanceapp/glance · warning · errPartialContent
%w: could not get PRs: %s
Error message
%w: could not get PRs: %s
What it means
Returned by fetchRepositoryDetailsFromGithub (internal/glance/widget-repository.go:191) when the optional PR search (only requested when maxPRs > 0, prs-to-show) failed, while the core repository details succeeded. Wrapped in errPartialContent: the widget still renders stars/forks and whatever other sections loaded, omitting or zeroing the PR list. The PR data comes from GET /search/issues?q=is:pr+is:open+repo:{repo}, which is search-API rate-limited separately (10 req/min unauthenticated).
Source
Thrown at internal/glance/widget-repository.go:191
if detailsErr != nil {
return repository{}, fmt.Errorf("%w: could not get repository details: %s", errNoContent, detailsErr)
}
details := repository{
Name: repositoryResponse.Name,
Stars: repositoryResponse.Stars,
Forks: repositoryResponse.Forks,
PullRequests: make([]githubTicket, 0, len(PRsResponse.Tickets)),
Issues: make([]githubTicket, 0, len(issuesResponse.Tickets)),
Commits: make([]githubCommitDetails, 0, len(commitsResponse)),
}
err = nil
if maxPRs > 0 {
if PRsErr != nil {
err = fmt.Errorf("%w: could not get PRs: %s", errPartialContent, PRsErr)
} else {
details.OpenPullRequests = PRsResponse.Count
for i := range PRsResponse.Tickets {
details.PullRequests = append(details.PullRequests, githubTicket{
Number: PRsResponse.Tickets[i].Number,
CreatedAt: parseRFC3339Time(PRsResponse.Tickets[i].CreatedAt),
Title: PRsResponse.Tickets[i].Title,
})
}
}
}
if maxIssues > 0 {
if issuesErr != nil {
// TODO: fix, overwriting the previous error
err = fmt.Errorf("%w: could not get issues: %s", errPartialContent, issuesErr)
} else {View on GitHub (pinned to 91324e8de7)
Solutions
- Add a GitHub token — authenticated search quota is 30 req/min
- Increase the page cache/refresh interval so search calls are less frequent
- If PRs are not needed, omit prs-to-show / set it to 0 so the search call is skipped entirely
- Check the wrapped %s message — it distinguishes rate limit from other failures
Defensive patterns
Strategy: retry
Try / catch
if err != nil && errors.Is(err, errPartialContent) && strings.Contains(err.Error(), "could not get PRs") {
// core data rendered; retry search call next refresh or reduce prs-to-show
} Prevention
- Authenticated tokens raise search quota to 30/min
- Set prs-to-show to 0 when PR data is unneeded
- Watch for the search API's separate, lower rate limit
When it happens
Trigger: GitHub search API 403 rate limit (unauthenticated search allows only 10 requests/minute); 422 from a malformed query (repo name with special characters); transient network failure on this one goroutine request while the main details call succeeded.
Common situations: Frequent widget refreshes burning the 10/min search quota; multiple repository widgets each issuing prs+issues searches; short cache-time settings.
Related errors
- %w: could not get issues: %s
- %w: could not get commits: %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/6f238d613e6edafe.
Report an issue: GitHub.