chg: better reporting for broken captures

pull/526/head
Raphaël Vinot 2022-09-26 16:04:23 +02:00
parent edd8d786d3
commit 8687d8fabf
1 changed files with 2 additions and 0 deletions

View File

@ -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: