jeessy2/ddns-go · error
%s
Error message
%s
What it means
getOriginGroup calls the EdgeOne DescribeOriginGroup API; even when the HTTP request succeeds, the response body can carry an API-level error inside Response.Error. When that Code field is non-empty, the library surfaces the API's own Message verbatim via fmt.Errorf("%s", ...). This means Tencent Cloud rejected the DescribeOriginGroup call itself (auth, zone, or parameter problem), not that the origin group is missing.
Source
Thrown at dns/edgeone_origin.go:230
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
}
}
return EdgeOneOriginGroup{}, fmt.Errorf("在 EdgeOne 中未找到源站组 GroupId=%s", groupId)
}
groupName := params.Get("OriginGroupName")
for _, group := range result.Response.OriginGroups {
if group.Name == groupName {View on GitHub (pinned to 5874c2e666)
Solutions
- Read the wrapped Message: it is EdgeOne's own error text and names the exact API failure (e.g. AuthFailure.SignatureFailure, ResourceNotFound, LimitExceeded).
- Verify the EdgeOne SecretId/SecretKey in ddns-go config are valid and belong to the account owning the zone.
- Confirm the site/zone exists in EdgeOne and getZoneId resolved correctly for this domain.
- Check the domain's custom params (?GroupId= or ?OriginGroupName=) are well-formed for the API.
- If the message is throttling, reduce sync frequency or the number of origin-group domains.
Example fix
// before (hard to tell which API failed)
return EdgeOneOriginGroup{}, fmt.Errorf("%s", result.Response.Error.Message)
// after (include code and action for diagnosis)
return EdgeOneOriginGroup{}, fmt.Errorf("DescribeOriginGroup failed: code=%s msg=%s", result.Response.Error.Code, result.Response.Error.Message) Defensive patterns
Strategy: try-catch
Validate before calling
// Go caller: check credentials/zone before relying on the sync
// ensure domain config includes ?GroupId= or ?OriginGroupName=
if !strings.Contains(domain, "GroupId=") && !strings.Contains(domain, "OriginGroupName=") {
return errors.New("edgeone origin-group domain must include ?GroupId= or ?OriginGroupName=")
} Try / catch
if err := eo.addUpdateOriginGroups(domains); err != nil {
// err may be an EdgeOne API Message (e.g. AuthFailure.*) — log and do NOT retry auth errors
if strings.Contains(err.Error(), "AuthFailure") {
log.Fatalf("fix EdgeOne credentials: %v", err)
}
log.Printf("edgeone origin group sync failed: %v", err)
} Prevention
- Verify EdgeOne SecretId/SecretKey with a test DescribeOriginGroup call after rotating keys
- Ensure the site/zone exists in EdgeOne before enabling origin-group mode in ddns-go
- Grant the API key CAM permission for EdgeOne Describe/Modify APIs
- Include both error Code and Message in logs to speed up diagnosis
When it happens
Trigger: Calling addUpdateOriginGroups for a domain whose custom params contain GroupId/OriginGroupName, where DescribeOriginGroup returns Response.Error.Code != "" — e.g. invalid SecretId/SecretKey, a ZoneId the credential cannot access, unsupported filter name, or throttling (RequestLimitExceeded).
Common situations: Expired or rotated Tencent Cloud API keys; using a EdgeOne zone ID from a different account; the domain's zone not actually added to EdgeOne; API permission (cam policy) missing DescribeOriginGroup; rate limiting when many domains sync at once.
Related errors
- dnsla 记录列表请求失败,状态码: %d, 响应: %s
- 在 EdgeOne 中未找到站点: %s
- 在 EdgeOne 中未找到源站组: %s
- 在 EdgeOne 中未找到源站组 GroupId=%s
- 找到多个名称匹配的源站组,请改用 GroupId 指定唯一源站组
AI-assisted analysis of jeessy2/ddns-go@5874c2e666 (2026-09-03).
Data as JSON: /api/errors/fd16ea13a8841d76.
Report an issue: GitHub.