{"record":{"id":"ad8ef3c505883041","repo":"jeessy2/ddns-go","slug":"edgeone-s","errorCode":null,"errorMessage":"在 EdgeOne 中未找到站点: %s","messagePattern":"在 EdgeOne 中未找到站点: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dns/edgeone_origin.go","lineNumber":142,"sourceCode":"\tif domain == nil {\n\t\treturn false\n\t}\n\tparams := domain.GetCustomParams()\n\treturn params.Has(\"GroupId\") || params.Has(\"OriginGroupName\")\n}\n\nfunc (eo *EdgeOne) getZoneId(domain *config.Domain) (string, error) {\n\tparams := domain.GetCustomParams()\n\tif params.Has(\"ZoneId\") {\n\t\treturn params.Get(\"ZoneId\"), nil\n\t}\n\n\tzoneResult, err := eo.getZone(domain.DomainName)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif zoneResult.Response.TotalCount <= 0 {\n\t\treturn \"\", fmt.Errorf(\"在 EdgeOne 中未找到站点: %s\", domain.DomainName)\n\t}\n\tfor _, zone := range zoneResult.Response.Zones {\n\t\tif zone.ZoneName == domain.DomainName {\n\t\t\treturn zone.ZoneId, nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"在 EdgeOne 中未找到站点: %s\", domain.DomainName)\n}\n\nfunc (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)","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/jeessy2/ddns-go/blob/5874c2e6667c69357ab95079421131104bd3fcae/dns/edgeone_origin.go#L124-L160","documentation":"This error is returned by getZoneId when the EdgeOne (Tencent Cloud) DescribeZones API returns TotalCount <= 0, meaning no zone matching the given domain exists in the EdgeOne account. The library requires the site to already exist in EdgeOne before it can resolve a ZoneId for origin group updates. Note the subsequent loop only matches zones whose ZoneName exactly equals domain.DomainName, so partial/parent-zone matches are not accepted.","triggerScenarios":"Calling addUpdateDomainRecords/addUpdateOriginGroups for a domain that has no site added in the EdgeOne console; the domain is registered under a different Tencent Cloud account; the domain name passed differs in case or suffix (e.g. subdomain vs apex) from the zone name in EdgeOne.","commonSituations":"User set up DNS records in dnsla/alidns but never added the site to EdgeOne; domain added to EdgeOne in another account or region; typo in the configured domain name (e.g. 'example.com.' with trailing dot); EdgeOne site still pending ownership verification and thus not listed.","solutions":["Add the domain as a site in the Tencent EdgeOne console (or via CreateZone API) before running the update","Verify the domain.DomainName exactly matches the ZoneName shown in EdgeOne (case, no trailing dot, correct subdomain level)","Confirm you are using credentials for the Tencent Cloud account that owns the EdgeOne site","Check the site isn't stuck in pending/not-active state; complete domain ownership verification if needed"],"exampleFix":"// before\nif zoneResult.Response.TotalCount <= 0 {\n    return \"\", fmt.Errorf(\"在 EdgeOne 中未找到站点: %s\", domain.DomainName)\n}\n// after\nif zoneResult.Response.TotalCount <= 0 {\n    return \"\", fmt.Errorf(\"在 EdgeOne 中未找到站点: %s，请先在 EdgeOne 控制台添加该站点并完成归属验证\", domain.DomainName)\n}","handlingStrategy":"validation","validationCode":"// 调用前确认站点已在 EdgeOne 存在\nzoneResult, err := eo.getZone(domain.DomainName)\nif err != nil {\n    return err\n}\nif zoneResult.Response.TotalCount <= 0 {\n    return fmt.Errorf(\"站点 %s 不在 EdgeOne 中，请先在控制台添加\", domain.DomainName)\n}","typeGuard":"func zoneExists(zoneResult *ZoneListResult, domainName string) bool {\n    for _, z := range zoneResult.Response.Zones {\n        if z.ZoneName == domainName {\n            return true\n        }\n    }\n    return false\n}","tryCatchPattern":"zoneId, err := eo.getZoneId(domain)\nif err != nil {\n    if strings.Contains(err.Error(), \"未找到站点\") {\n        // 提示用户先去 EdgeOne 创建站点，或跳过该域名\n        log.Warnf(\"跳过 %s: %v\", domain.DomainName, err)\n        return nil\n    }\n    return err\n}","preventionTips":["Add and verify all managed domains as EdgeOne sites before running record sync","Ensure domain names in config match EdgeOne ZoneName exactly (no trailing dots, correct case)","Confirm Tencent Cloud credentials point to the account owning the EdgeOne sites","Handle pending-verification sites explicitly — they won't appear in zone listings"],"tags":["edgeone","tencent-cloud","missing-resource","configuration"],"backgroundTag":"resource-not-found","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"}