{"record":{"id":"6f238d613e6edafe","repo":"glanceapp/glance","slug":"w-could-not-get-prs-s","errorCode":null,"errorMessage":"%w: could not get PRs: %s","messagePattern":"%w: could not get PRs: (.+?)","errorType":"exception","errorClass":"errPartialContent","httpStatus":null,"severity":"warning","filePath":"internal/glance/widget-repository.go","lineNumber":191,"sourceCode":"\n\tif detailsErr != nil {\n\t\treturn repository{}, fmt.Errorf(\"%w: could not get repository details: %s\", errNoContent, detailsErr)\n\t}\n\n\tdetails := repository{\n\t\tName:         repositoryResponse.Name,\n\t\tStars:        repositoryResponse.Stars,\n\t\tForks:        repositoryResponse.Forks,\n\t\tPullRequests: make([]githubTicket, 0, len(PRsResponse.Tickets)),\n\t\tIssues:       make([]githubTicket, 0, len(issuesResponse.Tickets)),\n\t\tCommits:      make([]githubCommitDetails, 0, len(commitsResponse)),\n\t}\n\n\terr = nil\n\n\tif maxPRs > 0 {\n\t\tif PRsErr != nil {\n\t\t\terr = fmt.Errorf(\"%w: could not get PRs: %s\", errPartialContent, PRsErr)\n\t\t} else {\n\t\t\tdetails.OpenPullRequests = PRsResponse.Count\n\n\t\t\tfor i := range PRsResponse.Tickets {\n\t\t\t\tdetails.PullRequests = append(details.PullRequests, githubTicket{\n\t\t\t\t\tNumber:    PRsResponse.Tickets[i].Number,\n\t\t\t\t\tCreatedAt: parseRFC3339Time(PRsResponse.Tickets[i].CreatedAt),\n\t\t\t\t\tTitle:     PRsResponse.Tickets[i].Title,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\tif maxIssues > 0 {\n\t\tif issuesErr != nil {\n\t\t\t// TODO: fix, overwriting the previous error\n\t\t\terr = fmt.Errorf(\"%w: could not get issues: %s\", errPartialContent, issuesErr)\n\t\t} else {","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-repository.go#L173-L209","documentation":"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).","triggerScenarios":"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.","commonSituations":"Frequent widget refreshes burning the 10/min search quota; multiple repository widgets each issuing prs+issues searches; short cache-time settings.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && errors.Is(err, errPartialContent) && strings.Contains(err.Error(), \"could not get PRs\") {\n    // core data rendered; retry search call next refresh or reduce prs-to-show\n}","preventionTips":["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"],"tags":["github","partial-content","rate-limit","repository"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}