Why do you have this exception check here? Your `try` block has nothing to do with `requests`. Exceptions should be caught closest to where they are raised.