{"record":{"id":"4bb892bcabe752b2","repo":"github/github-mcp-server","slug":"failed-to-get-base-rest-url-w","errorCode":null,"errorMessage":"failed to get base REST URL: %w","messagePattern":"failed to get base REST URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ghmcp/server.go","lineNumber":47,"sourceCode":"\t\"github.com/modelcontextprotocol/go-sdk/mcp\"\n\t\"github.com/shurcooL/githubv4\"\n)\n\n// githubClients holds all the GitHub API clients created for a server instance.\ntype githubClients struct {\n\trest         *gogithub.Client\n\trestUATransp *transport.UserAgentTransport\n\tgql          *githubv4.Client\n\tgqlHTTP      *http.Client // retained for middleware to modify transport\n\traw          *raw.Client\n\trepoAccess   *lockdown.RepoAccessCache\n}\n\n// createGitHubClients creates all the GitHub API clients needed by the server.\nfunc createGitHubClients(cfg github.MCPServerConfig, apiHost utils.APIHostResolver) (*githubClients, error) {\n\trestURL, err := apiHost.BaseRESTURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get base REST URL: %w\", err)\n\t}\n\n\tuploadURL, err := apiHost.UploadURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get upload URL: %w\", err)\n\t}\n\n\tgraphQLURL, err := apiHost.GraphqlURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get GraphQL URL: %w\", err)\n\t}\n\n\trawURL, err := apiHost.RawURL(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get Raw URL: %w\", err)\n\t}\n\n\t// Construct REST client. When a TokenProvider is configured, we","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/internal/ghmcp/server.go#L29-L65","documentation":"Error \"failed to get base REST URL: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at internal/ghmcp/server.go:47 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"}