diff --git a/src/domain_manager.py b/src/domain_manager.py index 63c9dcf..9d4dbb6 100644 --- a/src/domain_manager.py +++ b/src/domain_manager.py @@ -56,7 +56,11 @@ class DomainManager: def result_handler(result: asyncio.Task): if result.cancelled(): return "cancelled" - result = result.result() + try: + result = result.result() + except Exception as e: + logger.exception("Re-raised exception from task on debug for task") + result = e if result is None: return None if isinstance(result, Exception): diff --git a/src/wiki.py b/src/wiki.py index 67bbdb5..926eaa3 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -541,7 +541,7 @@ class Wiki: feeds_response.raise_for_status() except (aiohttp.ClientConnectionError, aiohttp.ServerTimeoutError, asyncio.TimeoutError, aiohttp.ClientResponseError, aiohttp.TooManyRedirects) as e: - logger.error("A connection error occurred while requesting {}".format(feeds_response.url)) + logger.error("A connection error occurred while requesting {} with params {}".format(url_path, params)) raise WikiServerError(e) return feeds_response, await feeds_response.json(encoding="UTF-8")