{"record":{"id":"62f16e0b6ad66170","repo":"jeessy2/ddns-go","slug":"s-ipv6","errorCode":null,"errorMessage":"未能获取域名 %s 对应的 IPv6 地址","messagePattern":"未能获取域名 (.+?) 对应的 IPv6 地址","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dns/edgeone_origin.go","lineNumber":170,"sourceCode":"func (eo *EdgeOne) getDesiredOriginRecords(domainTuple *config.DomainTuple) ([]EdgeOneOriginRecord, error) {\n\tdomain := domainTuple.Primary\n\tdomainName := domain.String()\n\tweight := eo.getOriginWeight(domain)\n\trecords := make([]EdgeOneOriginRecord, 0, 2)\n\n\tif eo.hasDomain(eo.Domains.Ipv4Domains, domainName) {\n\t\tif eo.Domains.Ipv4Addr == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"未能获取域名 %s 对应的 IPv4 地址\", domain)\n\t\t}\n\t\trecords = append(records, EdgeOneOriginRecord{\n\t\t\tRecord: eo.Domains.Ipv4Addr,\n\t\t\tType:   edgeoneOriginRecordType,\n\t\t\tWeight: weight,\n\t\t})\n\t}\n\tif eo.hasDomain(eo.Domains.Ipv6Domains, domainName) {\n\t\tif eo.Domains.Ipv6Addr == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"未能获取域名 %s 对应的 IPv6 地址\", domain)\n\t\t}\n\t\trecords = append(records, EdgeOneOriginRecord{\n\t\t\tRecord: eo.Domains.Ipv6Addr,\n\t\t\tType:   edgeoneOriginRecordType,\n\t\t\tWeight: weight,\n\t\t})\n\t}\n\tif len(records) == 0 {\n\t\treturn nil, fmt.Errorf(\"域名 %s 未配置可更新的源站记录\", domain)\n\t}\n\n\treturn records, nil\n}\n\nfunc (eo *EdgeOne) hasDomain(domains []*config.Domain, fullDomain string) bool {\n\tfor _, domain := range domains {\n\t\tif domain != nil && domain.String() == fullDomain {\n\t\t\treturn true","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/jeessy2/ddns-go/blob/5874c2e6667c69357ab95079421131104bd3fcae/dns/edgeone_origin.go#L152-L188","documentation":"A validation guard inside getDesiredOriginRecords: the domain was matched against eo.Domains.Ipv6Domains, so an IPv6 origin record is expected, but eo.Domains.Ipv6Addr is empty — the resolver/config layer never populated the IPv6 address for this domain. The error fires before any EdgeOne API call, failing the origin-record build for addUpdateOriginGroups.","triggerScenarios":"Thrown at dns/edgeone_origin.go:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check why the IPv6 address resolution step left eo.Domains.Ipv6Addr empty for this domain (DNS AAAA-record lookup failure or skipped resolution)","Verify the domain actually has an AAAA record / IPv6 origin configured upstream","If the domain is IPv4-only, remove it from Ipv6Domains so the guard is not triggered","Re-run after ensuring the address-population step executes before addUpdateOriginGroups"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5874c2e6667c69357ab95079421131104bd3fcae","analyzedAt":"2026-09-03T15:41:16.799Z","contentChangedAt":"2026-09-03T15:41:16.799Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}