Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better exception handling in threat_intel.opendns._cached_by_domain wrapper #59

Closed
jjsendor opened this issue Apr 6, 2016 · 3 comments
Assignees

Comments

@jjsendor
Copy link
Contributor

jjsendor commented Apr 6, 2016

The wrapper raises a very descriptive exception 'dang' when the response from OpenDNS Investigate API call is empty. We could do better than that.

@jjsendor
Copy link
Contributor Author

jjsendor commented Apr 8, 2016

Digging deeper into this issue, I have realized that in the call to OpenDNS Investigate Categorization endpoint, the data in the post request is actually the whole array of domains requested in the call to threat_intel.opendns.categorization(), rather than a list of smaller arrays containing up to max_requests elements.

@jjsendor
Copy link
Contributor Author

jjsendor commented Apr 8, 2016

Looking at the examples in the official documentation, it is actually ok to put multiple domains in the JSON array sent ot the endpoint, though there is still a hard limit of 1000 domain in the single request.

This must be the root cause for the failing calls to these API endpoint.

@jjsendor
Copy link
Contributor Author

jjsendor commented Apr 8, 2016

I will take care of fixing the calls to the Domain Categorization endpoint in #60.

Regarding 'dang' we really need some better exception handling here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant