{"record":{"id":"6d415ed35a9e257a","repo":"github/github-mcp-server","slug":"failed-to-resolve-project-id-w","errorCode":null,"errorMessage":"failed to resolve project ID: %w","messagePattern":"failed to resolve project ID: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/projects.go","lineNumber":1619,"sourceCode":"\t\t} `graphql:\"user(login: $owner)\"`\n\t}\n\tvar projectIDQueryOrg struct {\n\t\tOrganization struct {\n\t\t\tProjectV2 struct {\n\t\t\t\tID githubv4.ID\n\t\t\t} `graphql:\"projectV2(number: $projectNumber)\"`\n\t\t} `graphql:\"organization(login: $owner)\"`\n\t}\n\n\tqueryVars := map[string]any{\n\t\t\"owner\":         githubv4.String(owner),\n\t\t\"projectNumber\": githubv4.Int(int32(projectNumber)), //nolint:gosec // Project numbers are small integers\n\t}\n\n\tif ownerType == \"org\" {\n\t\terr := gqlClient.Query(ctx, &projectIDQueryOrg, queryVars)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"%s: %w\", ProjectResolveIDFailedError, err)\n\t\t}\n\t\treturn projectIDQueryOrg.Organization.ProjectV2.ID, nil\n\t}\n\n\terr := gqlClient.Query(ctx, &projectIDQueryUser, queryVars)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"%s: %w\", ProjectResolveIDFailedError, err)\n\t}\n\treturn projectIDQueryUser.User.ProjectV2.ID, nil\n}\n\n// addProjectItem adds an item to a project by resolving the issue/PR number to a node ID\nfunc addProjectItem(ctx context.Context, gqlClient *githubv4.Client, owner, ownerType string, projectNumber int, itemOwner, itemRepo string, itemNumber int, itemType string) (*mcp.CallToolResult, any, error) {\n\tif itemType != \"issue\" && itemType != \"pull_request\" {\n\t\treturn utils.NewToolResultError(\"item_type must be either 'issue' or 'pull_request'\"), nil, nil\n\t}\n\n\t// Resolve the item number to a node ID","sourceCodeStart":1601,"sourceCodeEnd":1637,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/projects.go#L1601-L1637","documentation":"Error \"failed to resolve project ID: %w\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/projects.go:1619 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"}