diff --git a/website/web/genericapi.py b/website/web/genericapi.py index 054a601e..daa377c3 100644 --- a/website/web/genericapi.py +++ b/website/web/genericapi.py @@ -462,7 +462,9 @@ class CaptureInfo(Resource): # type: ignore[misc] params={'capture_uuid': 'The UUID of the capture'}) class CaptureCookies(Resource): # type: ignore[misc] def get(self, capture_uuid: str) -> dict[str, Any]: - return json.loads(lookyloo.get_cookies(capture_uuid).read()) + if cookies := lookyloo.get_cookies(capture_uuid).read(): + return json.loads(cookies) + return {} @api.route('/json//report')