chore(ui): add debug logs for SSE deserialization errors
All checks were successful
Build MIPS Binary / build (push) Successful in 1m56s

This commit is contained in:
spinline
2026-02-21 00:23:23 +03:00
parent 7129c9a8eb
commit f8639f2967

View File

@@ -105,8 +105,10 @@ pub fn provide_torrent_store() {
}
if let Some(data_str) = msg.data().as_string() {
if let Ok(bytes) = BASE64.decode(&data_str) {
if let Ok(event) = rmp_serde::from_slice::<AppEvent>(&bytes) {
match BASE64.decode(&data_str) {
Ok(bytes) => {
match rmp_serde::from_slice::<AppEvent>(&bytes) {
Ok(event) => {
match event {
AppEvent::FullList(list, _) => {
torrents_for_sse.update(|map| {
@@ -128,6 +130,14 @@ pub fn provide_torrent_store() {
}
}
}
},
Err(e) => {
log::error!("[SSE] Failed to deserialize AppEvent: {:?}", e);
}
}
},
Err(e) => {
log::error!("[SSE] Failed to decode base64: {:?}", e);
}
}
}