{"record":{"id":"ea62f7f55c05ced4","repo":"kubernetes/kops","slug":"failed-to-list-droplets-v","errorCode":null,"errorMessage":"failed to list droplets: %v","messagePattern":"failed to list droplets: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/digitalocean/resources.go","lineNumber":88,"sourceCode":"\t\t\treturn nil, err\n\t\t}\n\t\tfor _, t := range rt {\n\t\t\tresourceTrackers[t.Type+\":\"+t.ID] = t\n\t\t}\n\t}\n\n\treturn resourceTrackers, nil\n}\n\nfunc listDroplets(cloud fi.Cloud, clusterName string) ([]*resources.Resource, error) {\n\tc := cloud.(do.DOCloud)\n\tvar resourceTrackers []*resources.Resource\n\n\tclusterTag := \"KubernetesCluster:\" + strings.ReplaceAll(clusterName, \".\", \"-\")\n\n\tdroplets, err := c.GetAllDropletsByTag(clusterTag)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list droplets: %v\", err)\n\t}\n\n\tfor _, droplet := range droplets {\n\t\tresourceTracker := &resources.Resource{\n\t\t\tName:    droplet.Name,\n\t\t\tID:      strconv.Itoa(droplet.ID),\n\t\t\tType:    resourceTypeDroplet,\n\t\t\tDeleter: deleteDroplet,\n\t\t\tDumper:  dumpDroplet,\n\t\t\tObj:     droplet,\n\t\t}\n\n\t\tresourceTrackers = append(resourceTrackers, resourceTracker)\n\t}\n\n\treturn resourceTrackers, nil\n}\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/digitalocean/resources.go#L70-L106","documentation":"Fires in listDroplets when the DigitalOcean API call GetAllDropletsByTag fails while discovering droplets tagged for the cluster during resource listing/teardown — an API, credentials, or network failure, not an absence of droplets.","triggerScenarios":"Thrown at pkg/resources/digitalocean/resources.go:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the DigitalOcean API token and its scopes","Retry after transient API/network errors or rate limiting","Verify the cluster tag format (KubernetesCluster:<name with dots as dashes>)"],"exampleFix":null,"handlingStrategy":"retry","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"}