cloudflare / node-cloudflare

Node.js API for Client API
https://cloudflare.github.io/node-cloudflare/
Other
335 stars 92 forks source link

dnsRecords.add() adds a record, even if an existing record with the same name is already present #46

Closed jay-dee7 closed 5 years ago

jay-dee7 commented 5 years ago

Expected behavior

return an error saying record already exists with the same name

Actual Behavior

add the record anyway

terinjokes commented 5 years ago

This doesn't seem like a bug in the API bindings.

The same name appearing in DNS multiple times is valid. This often regularly happens when adding A and AAAA records for IPv4 and IPv6 sites. It's even valid within the same type, when configuring a domain for email, multiple MX records of the same name will be added with different values.

The API, or the API bindings, preventing users from duplicating names would prevent these valid use cases from working.