{"record":{"id":"dc81c39059544d5d","repo":"github/github-mcp-server","slug":"failed-to-get-upload-url-w","errorCode":null,"errorMessage":"failed to get upload URL: %w","messagePattern":"failed to get upload URL: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/ghmcp/server.go","lineNumber":52,"sourceCode":"type 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\n\t// authenticate via BearerAuthTransport and skip go-github's WithAuthToken:\n\t// the latter installs its own round tripper that would pin the static token\n\t// and shadow the dynamic one.\n\trestUATransport := &transport.UserAgentTransport{\n\t\tTransport: http.DefaultTransport,","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/internal/ghmcp/server.go#L34-L70","documentation":"Error \"failed to get upload URL: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at internal/ghmcp/server.go:52 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-16T03:17:38.424Z"}