{"record":{"id":"d35b7688c893d827","repo":"glanceapp/glance","slug":"w-could-not-get-commits-s","errorCode":null,"errorMessage":"%w: could not get commits: %s","messagePattern":"%w: could not get commits: (.+?)","errorType":"exception","errorClass":"errPartialContent","httpStatus":null,"severity":"warning","filePath":"internal/glance/widget-repository.go","lineNumber":224,"sourceCode":"\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 {\n\t\t\tdetails.OpenIssues = issuesResponse.Count\n\n\t\t\tfor i := range issuesResponse.Tickets {\n\t\t\t\tdetails.Issues = append(details.Issues, githubTicket{\n\t\t\t\t\tNumber:    issuesResponse.Tickets[i].Number,\n\t\t\t\t\tCreatedAt: parseRFC3339Time(issuesResponse.Tickets[i].CreatedAt),\n\t\t\t\t\tTitle:     issuesResponse.Tickets[i].Title,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\tif maxCommits > 0 {\n\t\tif CommitsErr != nil {\n\t\t\terr = fmt.Errorf(\"%w: could not get commits: %s\", errPartialContent, CommitsErr)\n\t\t} else {\n\t\t\tfor i := range commitsResponse {\n\t\t\t\tdetails.Commits = append(details.Commits, githubCommitDetails{\n\t\t\t\t\tSha:       commitsResponse[i].Sha,\n\t\t\t\t\tAuthor:    commitsResponse[i].Commit.Author.Name,\n\t\t\t\t\tCreatedAt: parseRFC3339Time(commitsResponse[i].Commit.Author.Date),\n\t\t\t\t\tMessage:   strings.SplitN(commitsResponse[i].Commit.Message, \"\\n\\n\", 2)[0],\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n\n\treturn details, err\n}\n","sourceCodeStart":206,"sourceCodeEnd":239,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-repository.go#L206-L239","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && errors.Is(err, errPartialContent) && strings.Contains(err.Error(), \"could not get commits\") {\n    // core data rendered; commit list omitted; retry on next cycle\n}","preventionTips":["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)"],"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"}