Skip to content

Commit

Permalink
connection: narrow error type of query_single_page
Browse files Browse the repository at this point in the history
  • Loading branch information
muzarski committed Aug 26, 2024
1 parent 1fda1ec commit e07cb33
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ impl Connection {
pub(crate) async fn query_single_page(
&self,
query: impl Into<Query>,
) -> Result<QueryResult, QueryError> {
) -> Result<QueryResult, UserRequestError> {
let query: Query = query.into();

// This method is used only for driver internal queries, so no need to consult execution profile here.
Expand All @@ -1018,12 +1018,11 @@ impl Connection {
query: impl Into<Query>,
consistency: Consistency,
serial_consistency: Option<SerialConsistency>,
) -> Result<QueryResult, QueryError> {
) -> Result<QueryResult, UserRequestError> {
let query: Query = query.into();
Ok(self
.query_with_consistency(&query, consistency, serial_consistency, None)
self.query_with_consistency(&query, consistency, serial_consistency, None)
.await?
.into_query_result()?)
.into_query_result()
}

pub(crate) async fn query(
Expand Down

0 comments on commit e07cb33

Please sign in to comment.