What errors/exceptions do I need to handle with urllib2.Request / urlopen?
<p>I have the following code to do a postback to a remote URL:</p>

<pre><code>request = urllib2.Request('http://www.example.com', postBackData, { 'User-Agent' : 'My User Agent' })

try: 
    response = urllib2.urlopen(request)
except urllib2.HTTPError, e:
    checksLogger.error('HTTPError = ' + str(e.code))
except urllib2.URLError, e:
    checksLogger.error('URLError = ' + str(e.reason))
except httplib.HTTPException, e:
    checksLogger.error('HTTPException')
</code></pre>

<p>The postBackData is created using a dictionary encoded using urllib.urlencode. checksLogger is a logger using <a href="http://docs.python.org/library/logging.html" rel="nofollow">logging</a>.</p>

<p>I have had a problem where this code runs when the remote server is down and the code exits (this is on customer servers so I don't know what the exit stack dump / error is at this time). I'm assuming this is because there is an exception and/or error that is not being handled. So are there any other exceptions that might be triggered that I'm not handling above?</p>
