Catch more general exception for the failed DNS lookup
for the sake of message formatting.