{"record":{"id":"27108308b1561710","repo":"jeessy2/ddns-go","slug":"edgeone-groupid-s","errorCode":null,"errorMessage":"在 EdgeOne 中未找到源站组 GroupId=%s","messagePattern":"在 EdgeOne 中未找到源站组 GroupId=(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dns/edgeone_origin.go","lineNumber":243,"sourceCode":"\tvar result EdgeOneOriginGroupResponse\n\tif err := eo.request(\"DescribeOriginGroup\", record, &result); err != nil {\n\t\treturn EdgeOneOriginGroup{}, err\n\t}\n\tif result.Response.Error.Code != \"\" {\n\t\treturn EdgeOneOriginGroup{}, fmt.Errorf(\"%s\", result.Response.Error.Message)\n\t}\n\tif result.Response.TotalCount <= 0 || len(result.Response.OriginGroups) == 0 {\n\t\treturn EdgeOneOriginGroup{}, fmt.Errorf(\"在 EdgeOne 中未找到源站组: %s\", domain)\n\t}\n\n\tif params.Has(\"GroupId\") {\n\t\tgroupId := params.Get(\"GroupId\")\n\t\tfor _, group := range result.Response.OriginGroups {\n\t\t\tif group.GroupId == groupId {\n\t\t\t\treturn group, nil\n\t\t\t}\n\t\t}\n\t\treturn EdgeOneOriginGroup{}, fmt.Errorf(\"在 EdgeOne 中未找到源站组 GroupId=%s\", groupId)\n\t}\n\n\tgroupName := params.Get(\"OriginGroupName\")\n\tfor _, group := range result.Response.OriginGroups {\n\t\tif group.Name == groupName {\n\t\t\treturn group, nil\n\t\t}\n\t}\n\tif len(result.Response.OriginGroups) == 1 {\n\t\treturn result.Response.OriginGroups[0], nil\n\t}\n\treturn EdgeOneOriginGroup{}, fmt.Errorf(\"找到多个名称匹配的源站组，请改用 GroupId 指定唯一源站组\")\n}\n\nfunc (eo *EdgeOne) modifyOriginGroup(originGroup EdgeOneOriginGroup, domainTuple *config.DomainTuple, zoneId string, records []EdgeOneOriginRecord) {\n\tif sameEdgeOneOriginRecords(originGroup.Records, records) {\n\t\tutil.Log(\"你的IP %s 没有变化, EdgeOne 源站组 %s\", strings.Join(edgeOneOriginRecordValues(records), \",\"), originGroup.Name)\n\t\treturn","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/jeessy2/ddns-go/blob/5874c2e6667c69357ab95079421131104bd3fcae/dns/edgeone_origin.go#L225-L261","documentation":"When the domain's custom params specify GroupId, getOriginGroup filters DescribeOriginGroup by origin-group-id and then re-checks each returned group for an exact GroupId match. If the API returns rows but none has that GroupId, it fails with 'origin group not found GroupId=<id>'. This guards against the API returning stale or differently-scoped results.","triggerScenarios":"addUpdateOriginGroups -> getOriginGroup with ?GroupId=<id> in the domain, where the filtered OriginGroups list contains no group whose GroupId equals the requested id.","commonSituations":"GroupId copied from the wrong zone or account; the group was deleted and recreated (new auto-generated ID); ID pasted with whitespace or truncated; the zone's ID in the request doesn't match the group's actual zone.","solutions":["Open the EdgeOne console, copy the current GroupId of the target origin group, and update the domain's ?GroupId= param.","If unsure of the ID, switch to ?OriginGroupName=<name> instead.","Confirm the group belongs to the same site/zone that getZoneId resolved for this domain.","Trim whitespace and ensure the full ID was pasted."],"exampleFix":"// before\ndomain.example.com?GroupId=og-9x8y7z\n// after (correct current group id from EdgeOne console)\ndomain.example.com?GroupId=og-1a2b3c4d","handlingStrategy":"validation","validationCode":"// Validate the GroupId param format and presence before running ddns-go\nid := customParams.Get(\"GroupId\")\nif id == \"\" || strings.TrimSpace(id) != id {\n    return errors.New(\"GroupId must be a non-empty, trimmed id from the EdgeOne console\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy GroupId directly from the EdgeOne console each time the group is recreated","Never hand-type long group IDs; paste and trim","Keep a record mapping domain -> GroupId in your config repo","Prefer GroupId over OriginGroupName to avoid both this and ambiguity errors"],"tags":["edgeone","origin-group","not-found","configuration"],"backgroundTag":"resource-not-found-by-id","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"}