jeessy2/ddns-go · error

请在域名后追加 ?GroupId=xxx 或 ?OriginGroupName=xxx

Error message

请在域名后追加 ?GroupId=xxx 或 ?OriginGroupName=xxx

What it means

A usage guard in getOriginGroup: neither the GroupId nor the OriginGroupName custom parameter was supplied on the domain, so there is no filter to locate a specific EdgeOne origin group. The faulting input is the domain's custom params string, which must carry one of the two supported selectors.

Source

Thrown at dns/edgeone_origin.go:222

	}
	return weight
}

func (eo *EdgeOne) getOriginGroup(domain *config.Domain, zoneId string) (EdgeOneOriginGroup, error) {
	params := domain.GetCustomParams()
	record := struct {
		ZoneId  string   `json:"ZoneId"`
		Filters []Filter `json:"Filters"`
	}{
		ZoneId: zoneId,
	}

	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

View on GitHub (pinned to 5874c2e666)

Solutions

  1. Append ?GroupId=xxx to the domain so the origin-group-id filter is used
  2. Append ?OriginGroupName=xxx to the domain so the origin-group-name filter is used
  3. Verify the custom-params string is being parsed correctly (correct delimiter, no typos) and that the key matches exactly GroupId or OriginGroupName
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dns/edgeone_origin.go:222 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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