Fix WiFi quick scan via agent and improve error messages

Agent fixes:
- Accept 'success' status for quick scans (not just 'started')
- WiFi quick scans return 'success' with results, not 'started'

Controller fixes:
- Pass through actual error messages from agent responses
- Previously showed generic "Agent returned error: 400"
- Now shows actual message like "Root privileges required for deep scan"
This commit is contained in:
cemaxecuter
2026-01-27 10:42:29 -05:00
parent 91d47bef36
commit ddfa21dd20
2 changed files with 24 additions and 9 deletions
+2 -1
View File
@@ -3596,7 +3596,8 @@ class InterceptAgentHandler(BaseHTTPRequestHandler):
if action == 'start':
result = mode_manager.start_mode(mode, body)
status = 200 if result.get('status') == 'started' else 400
# Accept both 'started' and 'success' as valid (quick scans return 'success')
status = 200 if result.get('status') in ('started', 'success') else 400
self._send_json(result, status)
elif action == 'stop':
result = mode_manager.stop_mode(mode)