removing exception if domain zone not found. Logging the issue instead

This commit is contained in:
csine-nflx 2020-02-04 14:50:56 -08:00
parent 48bccd6f68
commit 8ea54d7db2
1 changed files with 5 additions and 1 deletions

View File

@ -234,8 +234,12 @@ def _get_zone_name(domain, account_number):
zone_name = z zone_name = z
if not zone_name: if not zone_name:
function = sys._getframe().f_code.co_name function = sys._getframe().f_code.co_name
log_data = {
"function": function,
"fqdn": domain,
"message": "No PowerDNS zone name found.",
}
metrics.send(f"{function}.fail", "counter", 1) metrics.send(f"{function}.fail", "counter", 1)
raise Exception(f"No PowerDNS zone found for domain: {domain}")
return zone_name return zone_name