github/github-mcp-server · error
failed to get repo access cache: %w
Error message
failed to get repo access cache: %w
What it means
Error "failed to get repo access cache: %w" thrown in github/github-mcp-server.
Source
Thrown at pkg/github/pullrequests.go:166
case "get_reviews":
result, err := GetPullRequestReviews(ctx, client, deps, owner, repo, pullNumber, pagination)
return attachIFC(result), nil, err
case "get_comments":
result, err := GetIssueComments(ctx, client, deps, owner, repo, pullNumber, pagination)
return attachIFC(result), nil, err
case "get_check_runs":
result, err := GetPullRequestCheckRuns(ctx, client, owner, repo, pullNumber, pagination)
return attachIFC(result), nil, err
default:
return utils.NewToolResultError(fmt.Sprintf("unknown method: %s", method)), nil, nil
}
})
}
func GetPullRequest(ctx context.Context, client *github.Client, deps ToolDependencies, owner, repo string, pullNumber int) (*mcp.CallToolResult, error) {
cache, err := deps.GetRepoAccessCache(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get repo access cache: %w", err)
}
ff := deps.GetFlags(ctx)
pr, resp, err := client.PullRequests.Get(ctx, owner, repo, pullNumber)
if err != nil {
return ghErrors.NewGitHubAPIErrorResponse(ctx,
"failed to get pull request",
resp,
err,
), nil
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read response body: %w", err)
}View on GitHub (pinned to 0ea1f775a7)
When it happens
Trigger: Thrown at pkg/github/pullrequests.go:166 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/f9431de202daab92.
Report an issue: GitHub.