Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Lint

kalil032149a345fb19e9
diff --git a/browser_use/browser/watchdogs/har_recording_watchdog.py b/browser_use/browser/watchdogs/har_recording_watchdog.py
index f3b43dfbb..f2a82ae37 100644
--- a/browser_use/browser/watchdogs/har_recording_watchdog.py
+++ b/browser_use/browser/watchdogs/har_recording_watchdog.py
@@ -357,13 +357,10 @@ class HarRecordingWatchdog(BaseWatchdog):
response.get('securityDetails') if isinstance(response, dict) else getattr(response, 'securityDetails', None)
)
if security_details_raw:
- if isinstance(security_details_raw, dict):
- entry.security_details = security_details_raw
- else:
- try:
- entry.security_details = dict(security_details_raw)
- except Exception:
- pass
+ try:
+ entry.security_details = dict(security_details_raw)
+ except Exception:
+ pass
except Exception as e:
self.logger.debug(f'responseReceived handling error: {e}')