MeltwaterArchive/datasift-python

Exception handler in StreamConsumer_HTTP_Thread is too broad

Closed this issue · 1 comments

A large try/except captures much of the reading code, with the except line here:

https://github.com/datasift/datasift-python/blob/develop/datasift/streamconsumer_http.py#L110

This catches everything, including errors in client's handler code, making debugging much harder.

The try/except should be more targetted in terms of the code that it surrounds, and the exception type should be a lot more specific (perhaps just socket exceptions, if that's what it's trying to catch - which is what is implied by the error message.)

stut commented

This exception handler has been removed as part of fixing the buffering issues.