From 8687d8fabf9874b12e5b5c3ca430c58052a5d83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 26 Sep 2022 16:04:23 +0200 Subject: [PATCH] chg: better reporting for broken captures --- lookyloo/lookyloo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index cdf8a364..6bab83b1 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -551,6 +551,8 @@ class Lookyloo(): '''Get file(s) from the capture directory''' try: capture_dir = self._captures_index[capture_uuid].capture_dir + except NoValidHarFile: + return BytesIO(f'Capture {capture_uuid} has no HAR entries, which means it is broken.'.encode()) except MissingUUID: return BytesIO(f'Capture {capture_uuid} not unavailable, try again later.'.encode()) except MissingCaptureDirectory: