Closed wking closed 7 years ago
Instead of catching URLError. URLError is for protocol-level issues (e.g. wrapping an SSLError if you attempt an HTTPS connection to a server that does not speak TLS). They do not have much structure.
URLError
SSLError
HTTPError, on the other hand, is for things like 400 errors and they do support things like geturl.
HTTPError
geturl
LGTM
Instead of catching
URLError
.URLError
is for protocol-level issues (e.g. wrapping anSSLError
if you attempt an HTTPS connection to a server that does not speak TLS). They do not have much structure.HTTPError
, on the other hand, is for things like 400 errors and they do support things likegeturl
.