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:
@@ -9,6 +9,7 @@ use keyring::Entry;
|
||||
const SERVICE_NAME: &str = "zclaw";
|
||||
|
||||
/// Store a value securely in the OS keyring
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub fn secure_store_set(key: String, value: String) -> Result<(), String> {
|
||||
let entry = Entry::new(SERVICE_NAME, &key).map_err(|e| {
|
||||
@@ -31,6 +32,7 @@ pub fn secure_store_set(key: String, value: String) -> Result<(), String> {
|
||||
}
|
||||
|
||||
/// Retrieve a value from the OS keyring
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub fn secure_store_get(key: String) -> Result<String, String> {
|
||||
let entry = Entry::new(SERVICE_NAME, &key).map_err(|e| {
|
||||
@@ -53,6 +55,7 @@ pub fn secure_store_get(key: String) -> Result<String, String> {
|
||||
}
|
||||
|
||||
/// Delete a value from the OS keyring
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub fn secure_store_delete(key: String) -> Result<(), String> {
|
||||
let entry = Entry::new(SERVICE_NAME, &key).map_err(|e| {
|
||||
@@ -78,6 +81,7 @@ pub fn secure_store_delete(key: String) -> Result<(), String> {
|
||||
}
|
||||
|
||||
/// Check if secure storage is available on this platform
|
||||
// @connected
|
||||
#[tauri::command]
|
||||
pub fn secure_store_is_available() -> bool {
|
||||
// Try to create a test entry to verify keyring is working
|
||||
|
||||
Reference in New Issue
Block a user