Don't return an error if there's an issue parsing battery status

This commit is contained in:
Simon Fondrie-Teitler
2025-08-28 13:22:56 -04:00
committed by Cooper Quintin
parent 16447ed8bf
commit 64d657efd6

View File

@@ -31,7 +31,10 @@ impl SystemStats {
battery_status: match get_battery_status(device).await {
Ok(status) => Some(status),
Err(RayhunterError::FunctionNotSupportedForDeviceError) => None,
Err(err) => return Err(err.to_string()),
Err(err) => {
log::error!("Failed to get battery status: {err}");
None
}
},
})
}