fix: [circl_passivedns] Return not found error

If passivedns returns empty response, return Not found error instead of error in log
pull/405/head
Jakub Onderka 2020-06-03 10:48:43 +02:00
parent 9afaeb162f
commit 6e21893be4
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,11 @@ class PassiveDNSParser():
except Exception:
self.result = {'error': 'There is an authentication error, please make sure you supply correct credentials.'}
return
if not results:
self.result = {'error': 'Not found'}
return
mapping = {'count': 'counter', 'origin': 'text',
'time_first': 'datetime', 'rrtype': 'text',
'rrname': 'text', 'rdata': 'text',