{"record":{"id":"f9431de202daab92","repo":"github/github-mcp-server","slug":"failed-to-get-repo-access-cache-w-f9431d","errorCode":null,"errorMessage":"failed to get repo access cache: %w","messagePattern":"failed to get repo access cache: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/pullrequests.go","lineNumber":166,"sourceCode":"\t\t\tcase \"get_reviews\":\n\t\t\t\tresult, err := GetPullRequestReviews(ctx, client, deps, owner, repo, pullNumber, pagination)\n\t\t\t\treturn attachIFC(result), nil, err\n\t\t\tcase \"get_comments\":\n\t\t\t\tresult, err := GetIssueComments(ctx, client, deps, owner, repo, pullNumber, pagination)\n\t\t\t\treturn attachIFC(result), nil, err\n\t\t\tcase \"get_check_runs\":\n\t\t\t\tresult, err := GetPullRequestCheckRuns(ctx, client, owner, repo, pullNumber, pagination)\n\t\t\t\treturn attachIFC(result), nil, err\n\t\t\tdefault:\n\t\t\t\treturn utils.NewToolResultError(fmt.Sprintf(\"unknown method: %s\", method)), nil, nil\n\t\t\t}\n\t\t})\n}\n\nfunc GetPullRequest(ctx context.Context, client *github.Client, deps ToolDependencies, owner, repo string, pullNumber int) (*mcp.CallToolResult, error) {\n\tcache, err := deps.GetRepoAccessCache(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get repo access cache: %w\", err)\n\t}\n\tff := deps.GetFlags(ctx)\n\n\tpr, resp, err := client.PullRequests.Get(ctx, owner, repo, pullNumber)\n\tif err != nil {\n\t\treturn ghErrors.NewGitHubAPIErrorResponse(ctx,\n\t\t\t\"failed to get pull request\",\n\t\t\tresp,\n\t\t\terr,\n\t\t), nil\n\t}\n\tdefer func() { _ = resp.Body.Close() }()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\tbody, err := io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to read response body: %w\", err)\n\t\t}","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/pullrequests.go#L148-L184","documentation":"Error \"failed to get repo access cache: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/pullrequests.go:166 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"}