mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
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.
This commit is contained in:
committed by
Franco Fichtner
parent
79b8b87539
commit
34d5dacece
@@ -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}");
|
||||
|
||||
Reference in New Issue
Block a user