Should we handle ReadTimeout exceptions?
martinburchell opened this issue · comments
My code that calls detect_backend()
catches EmbedVideoException
. I notice that get_info()
in VimeoBackend
and SoundCloudBackend
can throw a ReadTimeout
exception from the requests library. I'm wondering if the timeout exception should be wrapped in a new descendant of EmbedVideoException
. That way I wouldn't have to handle ReadTimeout
myself.
It could be a good idea to raise an error with exception chaining by using the explicit raise EmbedVideoException('Video backend timeout') from ...
, which would make error traces a bit more readable since it would imply this plugin as the partial culprit.