fix(tauri): replace silent let _ = with structured logging across 20 modules

Replace error-swallowing let _ = patterns with tracing::warn! in browser,
classroom, gateway, intelligence, memory, pipeline, secure_storage, and
viking command handlers. Ensures errors are observable in production logs.
This commit is contained in:
iven
2026-04-03 00:28:39 +08:00
parent 52bdafa633
commit 15d578c5bc
20 changed files with 129 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ impl Clone for BrowserState {
// ============================================================================
/// Create a new browser session
// @connected
#[tauri::command]
pub async fn browser_create_session(
state: State<'_, BrowserState>,
@@ -74,6 +75,7 @@ pub async fn browser_create_session(
}
/// Close a browser session
// @connected
#[tauri::command]
pub async fn browser_close_session(
state: State<'_, BrowserState>,
@@ -84,6 +86,7 @@ pub async fn browser_close_session(
}
/// List all browser sessions
// @connected
#[tauri::command]
pub async fn browser_list_sessions(
state: State<'_, BrowserState>,
@@ -106,6 +109,7 @@ pub async fn browser_list_sessions(
}
/// Get session info
// @connected
#[tauri::command]
pub async fn browser_get_session(
state: State<'_, BrowserState>,
@@ -130,6 +134,7 @@ pub async fn browser_get_session(
// ============================================================================
/// Navigate to URL
// @connected
#[tauri::command]
pub async fn browser_navigate(
state: State<'_, BrowserState>,
@@ -146,6 +151,7 @@ pub async fn browser_navigate(
}
/// Go back
// @connected
#[tauri::command]
pub async fn browser_back(
state: State<'_, BrowserState>,
@@ -156,6 +162,7 @@ pub async fn browser_back(
}
/// Go forward
// @connected
#[tauri::command]
pub async fn browser_forward(
state: State<'_, BrowserState>,
@@ -166,6 +173,7 @@ pub async fn browser_forward(
}
/// Refresh page
// @connected
#[tauri::command]
pub async fn browser_refresh(
state: State<'_, BrowserState>,
@@ -176,6 +184,7 @@ pub async fn browser_refresh(
}
/// Get current URL
// @connected
#[tauri::command]
pub async fn browser_get_url(
state: State<'_, BrowserState>,
@@ -186,6 +195,7 @@ pub async fn browser_get_url(
}
/// Get page title
// @connected
#[tauri::command]
pub async fn browser_get_title(
state: State<'_, BrowserState>,
@@ -200,6 +210,7 @@ pub async fn browser_get_title(
// ============================================================================
/// Find element
// @connected
#[tauri::command]
pub async fn browser_find_element(
state: State<'_, BrowserState>,
@@ -225,6 +236,7 @@ pub async fn browser_find_element(
}
/// Find multiple elements
// @connected
#[tauri::command]
pub async fn browser_find_elements(
state: State<'_, BrowserState>,
@@ -253,6 +265,7 @@ pub async fn browser_find_elements(
}
/// Click element
// @connected
#[tauri::command]
pub async fn browser_click(
state: State<'_, BrowserState>,
@@ -264,6 +277,7 @@ pub async fn browser_click(
}
/// Type text into element
// @connected
#[tauri::command]
pub async fn browser_type(
state: State<'_, BrowserState>,
@@ -288,6 +302,7 @@ pub async fn browser_type(
}
/// Get element text
// @connected
#[tauri::command]
pub async fn browser_get_text(
state: State<'_, BrowserState>,
@@ -299,6 +314,7 @@ pub async fn browser_get_text(
}
/// Get element attribute
// @connected
#[tauri::command]
pub async fn browser_get_attribute(
state: State<'_, BrowserState>,
@@ -314,6 +330,7 @@ pub async fn browser_get_attribute(
}
/// Wait for element
// @connected
#[tauri::command]
pub async fn browser_wait_for_element(
state: State<'_, BrowserState>,
@@ -347,6 +364,7 @@ pub async fn browser_wait_for_element(
// ============================================================================
/// Execute JavaScript
// @connected
#[tauri::command]
pub async fn browser_execute_script(
state: State<'_, BrowserState>,
@@ -362,6 +380,7 @@ pub async fn browser_execute_script(
}
/// Take screenshot
// @connected
#[tauri::command]
pub async fn browser_screenshot(
state: State<'_, BrowserState>,
@@ -377,6 +396,7 @@ pub async fn browser_screenshot(
}
/// Take element screenshot
// @connected
#[tauri::command]
pub async fn browser_element_screenshot(
state: State<'_, BrowserState>,
@@ -396,6 +416,7 @@ pub async fn browser_element_screenshot(
}
/// Get page source
// @connected
#[tauri::command]
pub async fn browser_get_source(
state: State<'_, BrowserState>,
@@ -410,6 +431,7 @@ pub async fn browser_get_source(
// ============================================================================
/// Scrape page content
// @connected
#[tauri::command]
pub async fn browser_scrape_page(
state: State<'_, BrowserState>,
@@ -442,6 +464,7 @@ pub async fn browser_scrape_page(
}
/// Fill form
// @connected
#[tauri::command]
pub async fn browser_fill_form(
state: State<'_, BrowserState>,