Archived
1
0
Fork 0

log errors while fetching feeds

This commit is contained in:
Lukas Winkler 2018-01-07 20:31:08 +01:00
parent 5de573ffd6
commit 8c2011ab4a

View file

@ -52,7 +52,12 @@ if "sentry_url" in config and ("debug" not in config or not config["debug"]):
async def fetch(session, url):
async with session.get(url) as response:
return await response.text()
try:
return await response.text()
except Exception as e:
logging.exception("failed to fetch {url}".format(url=url))
if client is not None:
client.captureException()
async def main(loop, sites):