jeessy2/ddns-go · error

在 EdgeOne 中未找到源站组: %s

Error message

在 EdgeOne 中未找到源站组: %s

What it means

After a successful DescribeOriginGroup call with no API error, getOriginGroup checks TotalCount/OriginGroups; if the zone has no origin groups at all matching the query, it fails with 'origin group not found: <domain>'. The library requires the origin group to already exist in EdgeOne; it only updates existing groups (via modifyOriginGroup), never creates them.

Source

Thrown at dns/edgeone_origin.go:233

	}

	if params.Has("GroupId") {
		record.Filters = []Filter{{Name: "origin-group-id", Values: []string{params.Get("GroupId")}}}
	} else if params.Has("OriginGroupName") {
		record.Filters = []Filter{{Name: "origin-group-name", Values: []string{params.Get("OriginGroupName")}}}
	} else {
		return EdgeOneOriginGroup{}, fmt.Errorf("请在域名后追加 ?GroupId=xxx 或 ?OriginGroupName=xxx")
	}

	var result EdgeOneOriginGroupResponse
	if err := eo.request("DescribeOriginGroup", record, &result); err != nil {
		return EdgeOneOriginGroup{}, err
	}
	if result.Response.Error.Code != "" {
		return EdgeOneOriginGroup{}, fmt.Errorf("%s", result.Response.Error.Message)
	}
	if result.Response.TotalCount <= 0 || len(result.Response.OriginGroups) == 0 {
		return EdgeOneOriginGroup{}, fmt.Errorf("在 EdgeOne 中未找到源站组: %s", domain)
	}

	if params.Has("GroupId") {
		groupId := params.Get("GroupId")
		for _, group := range result.Response.OriginGroups {
			if group.GroupId == groupId {
				return group, nil
			}
		}
		return EdgeOneOriginGroup{}, fmt.Errorf("在 EdgeOne 中未找到源站组 GroupId=%s", groupId)
	}

	groupName := params.Get("OriginGroupName")
	for _, group := range result.Response.OriginGroups {
		if group.Name == groupName {
			return group, nil
		}
	}

View on GitHub (pinned to 5874c2e666)

Solutions

  1. Create an origin group in the Tencent EdgeOne console for the site containing your origin records.
  2. Check the OriginGroupName custom param spelling matches the group name exactly (case-sensitive).
  3. Verify the domain resolves to the correct ZoneId (the zone where the group exists).
  4. If using GroupId, confirm the group ID still exists and wasn't recreated with a new ID.
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check in the EdgeOne console (or via API) that the origin group exists before configuring ddns-go:
// DescribeOriginGroup with Filters=[{Name:"origin-group-name",Values:["<name>"]}] must return TotalCount >= 1

Prevention

When it happens

Trigger: addUpdateOriginGroups -> getOriginGroup when the EdgeOne zone returns TotalCount <= 0 or an empty OriginGroups array for the given ZoneId + filter.

Common situations: User enabled ddns-go's EdgeOne origin-group mode but never created an origin group in the EdgeOne console; the origin group was deleted; typo'd OriginGroupName filter returns zero rows; wrong account/zone selected.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of jeessy2/ddns-go@5874c2e666 (2026-09-03). Data as JSON: /api/errors/d773594772d7c9ee. Report an issue: GitHub.