From 680eb1b3091831fffffe05c5e11161ba28e0e14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 21 Apr 2022 15:48:28 +0300 Subject: [PATCH] fix: better handling if capture fails. --- bin/async_capture.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/async_capture.py b/bin/async_capture.py index 34598aa3..0583b051 100755 --- a/bin/async_capture.py +++ b/bin/async_capture.py @@ -143,8 +143,9 @@ class AsyncCapture(AbstractManager): await capture.prepare_context() entries = await capture.capture_page(url, referer=referer) except Exception as e: - self.logger.critical(f'Something went terribly wrong when capturing {url}.') - raise e + self.logger.critical(f'Something went terribly wrong when capturing {url} - {e}') + return False, f'Something went terribly wrong when capturing {url}.' + if not entries: # broken self.logger.critical(f'Something went terribly wrong when capturing {url}.')