handle urllib2.HTTPError exception