From 34d5dacece88fd59504c46b89a1eca418aab75da Mon Sep 17 00:00:00 2001 From: Charles Ulrich Date: Tue, 11 Sep 2018 21:07:13 -0400 Subject: [PATCH] More informative cloudflare hostname error message I was confused for a long time about the error message "check your hostname is correct" because I wasn't actually setting the hostname, it was just using the hostname of the router. It turns out that this error was raised because the Dynamic DNS code can only update existing records, not create new ones. I think it would be better if it could create A records but for now this more informative error message gives another valid reason that the update could be failing. --- dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc index 7e02622b3..75dfff515 100644 --- a/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc +++ b/dns/dyndns/src/etc/inc/plugins.inc.d/dyndns/phpDynDNS.inc @@ -1125,7 +1125,7 @@ class updatedns } elseif ($output->errors[0]->code === 9103) { $status = "Dynamic DNS ({$this->_dnsHost}): ERROR - Invalid Credentials! Don't forget to use API Key for password field with CloudFlare."; } elseif (($output->success) && (!$output->result[0]->id)) { - $status = "Dynamic DNS ({$this->_dnsHost}): ERROR - Zone or Host ID was not found, check your hostname."; + $status = "Dynamic DNS ({$this->_dnsHost}): ERROR - Zone or Host ID was not found, check that your hostname is correct and an A record already exists."; } else { $status = "Dynamic DNS ({$this->_dnsHost}): UNKNOWN ERROR - {$output->errors[0]->message}"; log_error("Dynamic DNS ({$this->_dnsHost}): PAYLOAD: {$data}");