{"record":{"id":"eb760de3481eecbe","repo":"kubernetes/kops","slug":"could-not-create-record-v","errorCode":null,"errorMessage":"could not create record: %v","messagePattern":"could not create record: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/providers/do/dns.go","lineNumber":411,"sourceCode":"// and delete any previously created records matching the same name.\n// This is required for digitalocean since it's API does not handle record sets, but\n// only individual records\nfunc (r *resourceRecordChangeset) applyResourceRecordSet(rrset dnsprovider.ResourceRecordSet) error {\n\tdeleteRecords, err := getRecordsByName(r.client, r.zone.Name(), rrset.Name())\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get record IDs to delete\")\n\t}\n\n\tfor _, rrdata := range rrset.Rrdatas() {\n\t\trecordCreateRequest := &godo.DomainRecordEditRequest{\n\t\t\tName: rrset.Name(),\n\t\t\tData: rrdata,\n\t\t\tTTL:  int(rrset.Ttl()),\n\t\t\tType: string(rrset.Type()),\n\t\t}\n\t\terr := createRecord(r.client, r.zone.Name(), recordCreateRequest)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not create record: %v\", err)\n\t\t}\n\t}\n\n\tfor _, record := range deleteRecords {\n\t\terr := deleteRecord(r.client, r.zone.Name(), record.ID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error cleaning up old records: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// listDomains returns a list of godo.Domain\nfunc listDomains(c *godo.Client) ([]godo.Domain, error) {\n\t// TODO (andrewsykim): pagination in ListOptions\n\tdomains, _, err := c.Domains.List(context.TODO(), &godo.ListOptions{})\n\tif err != nil {","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/providers/do/dns.go#L393-L429","documentation":"DigitalOcean resourceRecordChangeset.applyResourceRecordSet wraps a failure of the godo CreateRecord call while applying additions in a record changeset. It fires when the DO API rejects creation of an individual DNS record (invalid data, auth, rate limit); since DO lacks record sets, each record is created individually and any failure aborts the changeset.","triggerScenarios":"Thrown at dnsprovider/pkg/dnsprovider/providers/do/dns.go:411 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the record name/type/TTL against DO API constraints","Verify API token permissions for the domain","Retry after rate-limit pauses"],"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-12T12:17:11.808Z"}