Closed krmaxwell closed 9 years ago
I like the spirit, but I would implement this differently:
1) I would make the dnsdb_query.DnsdbClient(server, api)
function itself validate the API key and server with a test query (idk, google.com). If the test fails, either the server is bad or the api key is bad, so you should return None.
2) Your check for dnsdb = None
is actually taking off ALL the enrichments, not just the dnsdb part. So maybe the solution is have the enrich_IPv4
check for the None
object and just "null out" the data related to dnsdb IPv4 enrichments
Ready for testing again.
@technoskald this is :shipit: for me.
Otherwise we get a bunch of
HTTP Error 403: forbidden
errors from requesting with an invalid API key.