mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-19 07:15:52 -04:00
better error handling for _fetch_url
This commit is contained in:
parent
5fccdd83e3
commit
53a1869def
@ -503,7 +503,11 @@ class BrozzlerWorker:
|
||||
timeout=self.FETCH_URL_TIMEOUT,
|
||||
)
|
||||
except requests.exceptions.Timeout as e:
|
||||
self.logger.warning("Timed out fetching %s: %s", page.url, e)
|
||||
self.logger.warning("Timed out fetching %s", url)
|
||||
if 'archive.org' in e:
|
||||
raise brozzler.ProxyError("proxy error fetching %s" % url) from e
|
||||
else:
|
||||
raise brozzler.PageConnectionError(timeout error fetching %s" % url) from e
|
||||
except requests.exceptions.ProxyError as e:
|
||||
raise brozzler.ProxyError("proxy error fetching %s" % url) from e
|
||||
except requests.exceptions.RequestException as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user