{"record":{"id":"6e5cc2409a4cbd45","repo":"github/github-mcp-server","slug":"failed-to-get-github-graphql-client-w","errorCode":null,"errorMessage":"failed to get GitHub GraphQL client: %w","messagePattern":"failed to get GitHub GraphQL client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/repositories.go","lineNumber":2579,"sourceCode":"\t\t\t}\n\t\t\tif _, hasPerPage := args[\"perPage\"]; hasPerPage {\n\t\t\t\tperPage, err := OptionalIntParam(args, \"perPage\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn utils.NewToolResultError(err.Error()), nil, nil\n\t\t\t\t}\n\t\t\t\tif perPage < 1 || perPage > 100 {\n\t\t\t\t\treturn utils.NewToolResultError(\"perPage must be between 1 and 100 when provided\"), nil, nil\n\t\t\t\t}\n\t\t\t\tpagination.PerPage = perPage\n\t\t\t}\n\t\t\tafterOffset, err := decodeBlameCursor(pagination.After)\n\t\t\tif err != nil {\n\t\t\t\treturn utils.NewToolResultError(err.Error()), nil, nil\n\t\t\t}\n\n\t\t\tclient, err := deps.GetGQLClient(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, nil, fmt.Errorf(\"failed to get GitHub GraphQL client: %w\", err)\n\t\t\t}\n\n\t\t\t// Default to HEAD and fetch defaultBranchRef.name in the same query\n\t\t\t// so the response can echo a readable ref.\n\t\t\trefExpression := ref\n\t\t\tif refExpression == \"\" {\n\t\t\t\trefExpression = \"HEAD\"\n\t\t\t}\n\n\t\t\tvar blameQuery struct {\n\t\t\t\tRepository struct {\n\t\t\t\t\tDefaultBranchRef struct {\n\t\t\t\t\t\tName githubv4.String\n\t\t\t\t\t}\n\t\t\t\t\tObject struct {\n\t\t\t\t\t\tTypename githubv4.String     `graphql:\"__typename\"`\n\t\t\t\t\t\tCommit   blameCommitFragment `graphql:\"... on Commit\"`\n\t\t\t\t\t\t// Annotated tag targets are followed one level. Tag-of-tag","sourceCodeStart":2561,"sourceCodeEnd":2597,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/repositories.go#L2561-L2597","documentation":"Error \"failed to get GitHub GraphQL client: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/repositories.go:2579 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"}