diff --git a/crates/common/upload/src/error.rs b/crates/common/upload/src/error.rs index 8f08452a868..7ff08151bbc 100644 --- a/crates/common/upload/src/error.rs +++ b/crates/common/upload/src/error.rs @@ -1,6 +1,6 @@ #[derive(Debug, thiserror::Error)] pub enum UploadError { - #[error("{context}")] + #[error("{context} {source}")] Io { context: String, source: std::io::Error, diff --git a/crates/extensions/tedge_config_manager/src/actor.rs b/crates/extensions/tedge_config_manager/src/actor.rs index b86eb040a32..8cd81901fb2 100644 --- a/crates/extensions/tedge_config_manager/src/actor.rs +++ b/crates/extensions/tedge_config_manager/src/actor.rs @@ -178,7 +178,7 @@ impl ConfigManagerActor { .insert(topic.name.clone(), ConfigOperation::Snapshot(request)); } Err(error) => { - let error_message = format!("Handling of operation failed with {}", error); + let error_message = format!("Handling of operation failed with: {}", error); request.failed(&error_message); error!("{}", error_message); self.publish_command_status(topic, &ConfigOperation::Snapshot(request)) @@ -231,7 +231,7 @@ impl ConfigManagerActor { .await?; } Err(err) => { - let error_message = format!("Handling of operation failed with {}", err); + let error_message = format!("Handling of operation failed with: {}", err); request.failed(&error_message); error!("{}", error_message); self.publish_command_status(&topic, &ConfigOperation::Snapshot(request)) @@ -254,7 +254,7 @@ impl ConfigManagerActor { .insert(topic.name.clone(), ConfigOperation::Update(request)); } Err(error) => { - let error_message = format!("Handling of operation failed with {}", error); + let error_message = format!("Handling of operation failed with: {}", error); request.failed(&error_message); error!("{}", error_message); self.publish_command_status(topic, &ConfigOperation::Update(request)) @@ -307,7 +307,7 @@ impl ConfigManagerActor { .await?; } Err(err) => { - let error_message = format!("Handling of operation failed with {}", err); + let error_message = format!("Handling of operation failed with: {}", err); request.failed(&error_message); error!("{}", error_message); self.publish_command_status(&topic, &ConfigOperation::Update(request)) diff --git a/crates/extensions/tedge_config_manager/src/tests.rs b/crates/extensions/tedge_config_manager/src/tests.rs index f617058c440..fc7ab4e3bbd 100644 --- a/crates/extensions/tedge_config_manager/src/tests.rs +++ b/crates/extensions/tedge_config_manager/src/tests.rs @@ -325,7 +325,7 @@ async fn request_config_snapshot_that_does_not_exist() -> Result<(), anyhow::Err mqtt.recv().await, Some(MqttMessage::new( &config_topic, - r#"{"status":"failed","reason":"Handling of operation failed with The requested config_type type_five is not defined in the plugin configuration file.","tedgeUrl":"http://127.0.0.1:3000/tedge/file-transfer/main/config-snapshot/type_five-1234","type":"type_five"}"# + r#"{"status":"failed","reason":"Handling of operation failed with: The requested config_type type_five is not defined in the plugin configuration file.","tedgeUrl":"http://127.0.0.1:3000/tedge/file-transfer/main/config-snapshot/type_five-1234","type":"type_five"}"# ).with_retain()) );