{"record":{"id":"93eddf60ecc67811","repo":"kubernetes/kops","slug":"error-fetching-info-for-project-q-v","errorCode":null,"errorMessage":"error fetching info for project %q: %v","messagePattern":"error fetching info for project %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_cloud.go","lineNumber":250,"sourceCode":"\n// Region returns private struct element region.\nfunc (c *gceCloudImplementation) Region() string {\n\treturn c.region\n}\n\n// Project returns private struct element project.\nfunc (c *gceCloudImplementation) Project() string {\n\treturn c.project\n}\n\n// ServiceAccount returns the email address for the service account that the instances will run under.\nfunc (c *gceCloudImplementation) ServiceAccount() (string, error) {\n\tif c.projectInfo == nil {\n\t\t// Find the project info from the compute API, which includes the default service account\n\t\tklog.V(2).Infof(\"fetching project %q from compute API\", c.project)\n\t\tp, err := c.compute.Projects().Get(c.project)\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"error fetching info for project %q: %v\", c.project, err)\n\t\t}\n\n\t\tc.projectInfo = p\n\t}\n\n\tif c.projectInfo.DefaultServiceAccount == \"\" {\n\t\treturn \"\", fmt.Errorf(\"compute project %q did not have DefaultServiceAccount\", c.project)\n\t}\n\n\treturn c.projectInfo.DefaultServiceAccount, nil\n}\n\nfunc (c *gceCloudImplementation) DNS() (dnsprovider.Interface, error) {\n\tprovider, err := clouddns.CreateInterface(c.project, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building (k8s) DNS provider: %v\", err)\n\t}\n\treturn provider, nil","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_cloud.go#L232-L268","documentation":"Wraps the compute Projects.Get failure in ServiceAccount while lazily fetching project info to obtain the default GCE service account email. Fires when the API call fails: wrong project ID, insufficient permissions, or API errors.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_cloud.go:250 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the project ID is correct","Grant compute.projects.get permission to the credentials","Inspect the wrapped API error"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}