{"record":{"id":"243bf19a93dacda2","repo":"github/github-mcp-server","slug":"failed-to-marshal-starred-repositories-w","errorCode":null,"errorMessage":"failed to marshal starred repositories: %w","messagePattern":"failed to marshal starred repositories: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/repositories.go","lineNumber":2196,"sourceCode":"\t\t\t\t\tStars:         repo.GetStargazersCount(),\n\t\t\t\t\tForks:         repo.GetForksCount(),\n\t\t\t\t\tOpenIssues:    repo.GetOpenIssuesCount(),\n\t\t\t\t\tPrivate:       repo.GetPrivate(),\n\t\t\t\t\tFork:          repo.GetFork(),\n\t\t\t\t\tArchived:      repo.GetArchived(),\n\t\t\t\t\tDefaultBranch: repo.GetDefaultBranch(),\n\t\t\t\t}\n\n\t\t\t\tif repo.UpdatedAt != nil {\n\t\t\t\t\tminimalRepo.UpdatedAt = repo.UpdatedAt.Format(\"2006-01-02T15:04:05Z\")\n\t\t\t\t}\n\n\t\t\t\tminimalRepos = append(minimalRepos, minimalRepo)\n\t\t\t}\n\n\t\t\tr, err := json.Marshal(minimalRepos)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"failed to marshal starred repositories: %w\", err)\n\t\t\t}\n\n\t\t\tresult := utils.NewToolResultText(string(r))\n\t\t\t// A starred-repository listing exposes repository data across many\n\t\t\t// repos; reuse the multi-repo join shared with search_repositories\n\t\t\t// (public-only results stay public-untrusted, mixed-visibility\n\t\t\t// results become private-untrusted, all-private results become\n\t\t\t// private-trusted). Visibility is read directly from the response,\n\t\t\t// so no extra API call is needed.\n\t\t\tvisibilities := make([]bool, 0, len(minimalRepos))\n\t\t\tfor _, mr := range minimalRepos {\n\t\t\t\tvisibilities = append(visibilities, mr.Private)\n\t\t\t}\n\t\t\tresult = attachJoinedIFCLabel(ctx, deps, result, visibilities, ifc.LabelSearchIssues)\n\t\t\treturn result, nil, nil\n\t\t},\n\t)\n}","sourceCodeStart":2178,"sourceCodeEnd":2214,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/repositories.go#L2178-L2214","documentation":"Error \"failed to marshal starred repositories: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/repositories.go:2196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}