aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/actions.rs
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 01:52:06 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 01:52:06 +0100
commite510e1cb157bec78ffb5bccdabb4b33e7d507d3d (patch)
tree6b67155f96fc93e5e3049e496f36e98080351c61 /src/actions.rs
parentd9621cf95201c7a64a365686201f40bbd5952156 (diff)
downloadsentrum-e510e1cb157bec78ffb5bccdabb4b33e7d507d3d.tar.gz
sentrum-e510e1cb157bec78ffb5bccdabb4b33e7d507d3d.tar.bz2
sentrum-e510e1cb157bec78ffb5bccdabb4b33e7d507d3d.zip
Log errors occuring during action::run
Diffstat (limited to 'src/actions.rs')
-rw-r--r--src/actions.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/actions.rs b/src/actions.rs
index 0daec15..648966c 100644
--- a/src/actions.rs
+++ b/src/actions.rs
@@ -3,7 +3,7 @@ use std::fmt;
use anyhow::Result;
use async_scoped::TokioScope;
use async_trait::async_trait;
-use log::{debug, info, warn};
+use log::{debug, error, info, warn};
use serde::Deserialize;
use crate::message::MessageConfig;
@@ -139,7 +139,17 @@ pub async fn run_actions(
.unwrap_or("txid".to_string()),
action.name()
);
- action.run(params_ref);
+ if let Err(e) = action.run(params_ref).await {
+ error!(
+ "[{}][{}][{}] could not run action: {}",
+ params_ref.map(|p| p.wallet()).unwrap_or("wallet"),
+ params_ref
+ .map(|p| p.txid_short())
+ .unwrap_or("txid".to_string()),
+ action.name(),
+ e
+ );
+ }
});
}
});