From af7aa7489a7228ac7128da482a258f8d09e0b385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hermann=20H=C3=B6hne?= Date: Wed, 4 Dec 2024 13:14:27 +0100 Subject: [PATCH] One error more forwarded to the front-end. --- src/rust/src/bridge_commands.rs | 2 ++ src/rust/src/core.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rust/src/bridge_commands.rs b/src/rust/src/bridge_commands.rs index 853b4a2..aff0fa9 100755 --- a/src/rust/src/bridge_commands.rs +++ b/src/rust/src/bridge_commands.rs @@ -14,6 +14,8 @@ unsafe fn send_cmd( } Err(err) => { println!("rust: command_tx.send {err}"); + //crate::core::purple_error(account, 0 /* PURPLE_CONNECTION_ERROR_NETWORK_ERROR */ , format!("Error sending command to the rust runtime: {err:?}")); + // TODO: can we call purple_error directly as this is executed in the main glib thread? } } } diff --git a/src/rust/src/core.rs b/src/rust/src/core.rs index 16b4d26..4c5a04c 100755 --- a/src/rust/src/core.rs +++ b/src/rust/src/core.rs @@ -89,7 +89,7 @@ async fn run( crate::bridge::append_message(&message); } Err(err) => { - purple_error(account, 16, format!("Error linking device: {err:?}")); + crate::core::purple_error(account, 2 /* PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED */, format!("Error linking device: {err:?}")); } } })