netbirdio/netbird · error
AAAA record is required
Error message
AAAA record is required
What it means
validateIPv6 returns this when Type is "AAAA" and Content is the empty string. It is the AAAA counterpart of the A-record empty-content check and fires before any IP parsing.
Source
Thrown at management/internals/modules/zones/records/record.go:122
"zone_id": zoneID,
"zone_name": zoneName,
}
}
func validateIPv4(content string) error {
if content == "" {
return errors.New("A record is required") //nolint:staticcheck
}
ip := net.ParseIP(content)
if ip == nil || ip.To4() == nil {
return errors.New("A record must be a valid IPv4 address") //nolint:staticcheck
}
return nil
}
func validateIPv6(content string) error {
if content == "" {
return errors.New("AAAA record is required")
}
ip := net.ParseIP(content)
if ip == nil || ip.To4() != nil {
return errors.New("AAAA record must be a valid IPv6 address")
}
return nil
}
View on GitHub (pinned to 93e97f4bf1)
Solutions
- Provide the IPv6 address in the content field, e.g. "2001:db8::1".
- Require content client-side for all record types.
- Skip emitting AAAA records entirely in migration scripts when the source has no IPv6 value.
Example fix
// before
{"name": "api", "type": "AAAA", "content": ""}
// after
{"name": "api", "type": "AAAA", "content": "2001:db8::1"} Defensive patterns
Strategy: validation
Validate before calling
if api.DNSRecordType(req.Type) == api.DNSRecordTypeAAAA && req.Content == "" {
return fmt.Errorf("content is required for AAAA records")
} Try / catch
if err := rec.Validate(); err != nil {
return respondBadRequest(err)
} Prevention
- Require content for every record type in the client.
- Skip AAAA records in migrations when the source has no IPv6 value.
When it happens
Trigger: A record body {"type":"AAAA","content":""} or with the content field omitted entirely.
Common situations: Form submits where only the type dropdown was set; clients that omit empty optional-looking fields rather than sending values; migration scripts that skip AAAA values when none exist but still emit the record.
Related errors
- AAAA record must be a valid IPv6 address
- record name is required
- invalid record name format
- record type is required
- invalid CNAME target format
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/06d5058f1ffb49dd.
Report an issue: GitHub.