diff --git a/query-engine/core/src/interactive_transactions/error.rs b/query-engine/core/src/interactive_transactions/error.rs index dfd8b37a3578..8189e2ce7420 100644 --- a/query-engine/core/src/interactive_transactions/error.rs +++ b/query-engine/core/src/interactive_transactions/error.rs @@ -1,5 +1,10 @@ use thiserror::Error; +use crate::{ + response_ir::{Item, Map}, + CoreError, +}; + #[derive(Debug, Error, PartialEq)] pub enum TransactionError { #[error("Unable to start a transaction in the given time.")] @@ -24,17 +29,17 @@ pub struct ExtendedTransactionUserFacingError { user_facing_error: user_facing_errors::Error, #[serde(skip_serializing_if = "indexmap::IndexMap::is_empty")] - extensions: crate::Map, + extensions: Map, } impl ExtendedTransactionUserFacingError { pub fn set_extension(&mut self, key: String, val: serde_json::Value) { - self.extensions.entry(key).or_insert(crate::Item::Json(val)); + self.extensions.entry(key).or_insert(Item::Json(val)); } } -impl From for ExtendedTransactionUserFacingError { - fn from(error: crate::CoreError) -> Self { +impl From for ExtendedTransactionUserFacingError { + fn from(error: CoreError) -> Self { ExtendedTransactionUserFacingError { user_facing_error: error.into(), extensions: Default::default(), diff --git a/query-engine/core/src/lib.rs b/query-engine/core/src/lib.rs index 4bdc9cc0a247..1645fa13e16f 100644 --- a/query-engine/core/src/lib.rs +++ b/query-engine/core/src/lib.rs @@ -15,8 +15,8 @@ pub mod telemetry; pub use self::{ error::{CoreError, FieldConversionError}, - executor::QueryExecutor, - interactive_transactions::{TransactionError, TxId}, + executor::{QueryExecutor, TransactionOptions}, + interactive_transactions::{ExtendedTransactionUserFacingError, TransactionError, TxId}, query_document::*, telemetry::*, };