{"record":{"id":"e7c4dfa06d433fc5","repo":"kubernetes/kops","slug":"load-balancer-service-get-request-returned-error","errorCode":null,"errorMessage":"load balancer service get request returned error %v","messagePattern":"load balancer service get request returned error (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/dotasks/loadbalancer.go","lineNumber":82,"sourceCode":"\t_ fi.HasAddress    = &LoadBalancer{}\n)\n\nfunc (lb *LoadBalancer) CompareWithID() *string {\n\treturn lb.ID\n}\n\nfunc (lb *LoadBalancer) Find(c *fi.CloudupContext) (*LoadBalancer, error) {\n\tklog.V(10).Infof(\"load balancer FIND - ID=%s, name=%s\", fi.ValueOf(lb.ID), fi.ValueOf(lb.Name))\n\tif fi.ValueOf(lb.ID) == \"\" {\n\t\t// Loadbalancer = nil if not found\n\t\treturn nil, nil\n\t}\n\n\tcloud := c.T.Cloud.(do.DOCloud)\n\tlbService := cloud.LoadBalancersService()\n\tloadbalancer, _, err := lbService.Get(context.TODO(), fi.ValueOf(lb.ID))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"load balancer service get request returned error %v\", err)\n\t}\n\n\treturn &LoadBalancer{\n\t\tName:    new(loadbalancer.Name),\n\t\tID:      new(loadbalancer.ID),\n\t\tRegion:  new(loadbalancer.Region.Slug),\n\t\tVPCUUID: new(loadbalancer.VPCUUID),\n\n\t\t// Ignore system fields\n\t\tLifecycle:         lb.Lifecycle,\n\t\tWellKnownServices: lb.WellKnownServices,\n\t}, nil\n}\n\nfunc (lb *LoadBalancer) Run(c *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(lb, c)\n}\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/dotasks/loadbalancer.go#L64-L100","documentation":"Wraps the DigitalOcean load-balancer Get-by-ID failure in Find. Fires when the DO API errors while fetching the LB referenced by its stored ID (auth, connectivity, or a stale ID for a deleted LB that is not reported as 404).","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/dotasks/loadbalancer.go:82 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped DO API error for the status code","Verify the LB still exists (doctl compute load-balancer list)","Reconcile stale state if the LB was deleted outside kops"],"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"}