mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Improve quick scan error handling and user feedback
Frontend (wifi.js): - Show helpful message when quick scan returns no networks - Suggest using Deep Scan as fallback - Better error messages with actionable suggestions Backend (scanner.py): - Add proper error messages from airport scan failures - Add proper error messages from nmcli scan failures - Handle timeouts and missing tools explicitly - Raise RuntimeError with descriptive messages These changes help users understand when quick scan tools (airport/nmcli) aren't working and guide them to use Deep Scan instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -302,6 +302,18 @@ const WiFiMode = (function() {
|
||||
const result = await response.json();
|
||||
console.log('[WiFiMode] Quick scan complete:', result);
|
||||
|
||||
// Check if we got results
|
||||
if (!result.access_points || result.access_points.length === 0) {
|
||||
if (result.error) {
|
||||
throw new Error(result.error);
|
||||
}
|
||||
// No error but no results - might need different tool
|
||||
console.warn('[WiFiMode] Quick scan returned no networks. Try Deep Scan instead.');
|
||||
showError('Quick scan found no networks. System tools may not be available. Try Deep Scan with monitor mode.');
|
||||
setScanning(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Process results
|
||||
processQuickScanResult(result);
|
||||
|
||||
@@ -312,7 +324,7 @@ const WiFiMode = (function() {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[WiFiMode] Quick scan error:', error);
|
||||
showError(error.message);
|
||||
showError(error.message + '. Try using Deep Scan instead.');
|
||||
setScanning(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user