diff --git a/src/dbs/executor.rs b/src/dbs/executor.rs index 39963ecc..979d690c 100644 --- a/src/dbs/executor.rs +++ b/src/dbs/executor.rs @@ -112,7 +112,7 @@ impl<'a> Executor<'a> { sql: v.sql, time: v.time, status: Status::Err, - detail: Some(format!("Transaction cancelled")), + detail: Some(format!("{}", Error::QueryCancelledError)), result: None, } } diff --git a/src/err/mod.rs b/src/err/mod.rs index b704dbea..5df8fbd8 100644 --- a/src/err/mod.rs +++ b/src/err/mod.rs @@ -70,6 +70,9 @@ pub enum Error { timer: Duration, }, + #[error("Query not executed due to cancelled transaction")] + QueryCancelledError, + #[error("Query not executed due to failed transaction")] QueryExecutionError,