apiCheckQNameAllowedCharacters(qname.toString());
QType qtype;
qtype = stringFromJson(rrset, "type");
+ if (qtype.getCode() == 0) {
+ throw ApiException("RRset "+qname.toString()+" IN "+stringFromJson(rrset, "type")+": unknown type given");
+ }
+
if(seen.count({qname, qtype}))
{
- throw ApiException("Duplicate RRset "+qname.toString()+" IN "+stringFromJson(rrset, "type"));
+ throw ApiException("Duplicate RRset "+qname.toString()+" IN "+qtype.getName());
}
seen.insert({qname, qtype});
- if (qtype.getCode() == 0) {
- throw ApiException("RRset "+qname.toString()+" IN "+stringFromJson(rrset, "type")+": unknown type given");
- }
if (changetype == "DELETE") {
// delete all matching qname/qtype RRs (and, implicitly comments).