{"record":{"id":"22a00e7185207cbb","repo":"glanceapp/glance","slug":"w-could-not-get-repository-details-s","errorCode":null,"errorMessage":"%w: could not get repository details: %s","messagePattern":"%w: could not get repository details: (.+?)","errorType":"exception","errorClass":"errNoContent","httpStatus":null,"severity":"error","filePath":"internal/glance/widget-repository.go","lineNumber":175,"sourceCode":"\t\twg.Add(1)\n\t\tgo (func() {\n\t\t\tdefer wg.Done()\n\t\t\tissuesResponse, issuesErr = decodeJsonFromRequest[githubTicketResponseJson](defaultHTTPClient, issuesRequest)\n\t\t})()\n\t}\n\n\tif maxCommits > 0 {\n\t\twg.Add(1)\n\t\tgo (func() {\n\t\t\tdefer wg.Done()\n\t\t\tcommitsResponse, CommitsErr = decodeJsonFromRequest[[]gitHubCommitResponseJson](defaultHTTPClient, CommitsRequest)\n\t\t})()\n\t}\n\n\twg.Wait()\n\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","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-repository.go#L157-L193","documentation":"Returned by fetchRepositoryDetailsFromGithub (internal/glance/widget-repository.go:175) when the primary request — GET api.github.com/repos/{repo} for the repo's stars/forks/name — failed to complete or decode. It is wrapped in errNoContent, so the repository widget shows no content rather than partial data, even though PR/issue/commit sub-requests may have succeeded. The underlying detailsErr is typically a non-200 (404 unknown repo, 401 bad token, 403 rate limit) or a JSON decode failure.","triggerScenarios":"404 for a typo'd/renamed/deleted repository; 401 with an invalid token; 403 with GitHub API rate limit exhausted (60/hr unauthenticated); network error or HTML error page that fails JSON decoding on the main repo endpoint.","commonSituations":"Anonymous Glance instances polling many GitHub repos hitting the 60 req/hr limit; expired PAT; repository renamed by upstream owner; GitHub incident serving 5xx HTML pages.","solutions":["Verify the repository exists: curl https://api.github.com/repos/{owner}/{repo}","Set a GitHub token (GITHUB_TOKEN env or token key in config) to raise the rate limit to 5000/hr","If rate-limited, wait for the limit window to reset and increase the widget's cache/update interval","Fix owner/name spelling in glance.yml"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && errors.Is(err, errNoContent) && strings.Contains(err.Error(), \"could not get repository details\") {\n    // 404/401/403: fix name or token; rate limit: back off and retry next cycle\n}","preventionTips":["Always configure a GitHub token for busy dashboards","Verify repos exist before adding","Raise refresh intervals to stay under API quotas"],"tags":["github","rate-limit","repository","http-status"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}