mirror of https://github.com/MISP/misp-modules
fix: [farsight_passivedns] Handling exceptions raised from a query error
- This can happen with for instance a wrong server URLpull/499/head
parent
8e55101dc8
commit
780590cee3
|
@ -148,6 +148,8 @@ def handler(q=False):
|
|||
response = to_query(client, *args)
|
||||
except dnsdb2.DnsdbException as e:
|
||||
return {'error': e.__str__()}
|
||||
except dnsdb2.exceptions.QueryError:
|
||||
return {'error': 'Communication error occurs while executing a query, or the server reports an error due to invalid arguments.'}
|
||||
if not response:
|
||||
return {'error': f"Empty results on Farsight DNSDB for the {TYPE_TO_FEATURE[attribute['type']]}: {attribute['value']}."}
|
||||
parser = FarsightDnsdbParser(attribute)
|
||||
|
|
Loading…
Reference in New Issue