fix(query): box transaction command errors
This commit is contained in:
1 file changed
+3
-3
@@ -26,7 +26,7 @@ struct ExecuteMultiProgress {
|
|||||||
#[derive(Debug, serde::Serialize)]
|
#[derive(Debug, serde::Serialize)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
pub enum ManualTransactionCommandError {
|
pub enum ManualTransactionCommandError {
|
||||||
Structured(BackendError),
|
Structured(Box<BackendError>),
|
||||||
Legacy(String),
|
Legacy(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,9 +476,9 @@ pub async fn execute_in_manual_transaction(
|
|||||||
.await
|
.await
|
||||||
.map_err(|error| {
|
.map_err(|error| {
|
||||||
if dbx_core::query::is_manual_transaction_session_expired_error(&error) {
|
if dbx_core::query::is_manual_transaction_session_expired_error(&error) {
|
||||||
ManualTransactionCommandError::Structured(BackendError::from_manual_transaction_session_expired(
|
ManualTransactionCommandError::Structured(Box::new(BackendError::from_manual_transaction_session_expired(
|
||||||
dbx_core::query::MANUAL_TRANSACTION_IDLE_TIMEOUT_SECS,
|
dbx_core::query::MANUAL_TRANSACTION_IDLE_TIMEOUT_SECS,
|
||||||
))
|
)))
|
||||||
} else {
|
} else {
|
||||||
ManualTransactionCommandError::Legacy(error)
|
ManualTransactionCommandError::Legacy(error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user