File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,7 @@ pub enum NewSessionError {
161161/// of internal driver API - a driver bug.
162162#[ derive( Error , Debug , Clone ) ]
163163#[ non_exhaustive]
164- pub enum ProtocolError {
165- /// Unable extract a partition key based on prepared statement's metadata.
166- #[ error( "Unable extract a partition key based on prepared statement's metadata" ) ]
167- PartitionKeyExtraction ,
168- }
164+ pub enum ProtocolError { }
169165
170166/// An error that occurred during `USE KEYSPACE <>` request.
171167#[ derive( Error , Debug , Clone ) ]
@@ -437,6 +433,10 @@ pub enum TablesMetadataError {
437433#[ error( "Invalid query passed to Session" ) ]
438434#[ non_exhaustive]
439435pub enum BadQuery {
436+ /// Unable extract a partition key based on prepared statement's metadata.
437+ #[ error( "Unable extract a partition key based on prepared statement's metadata" ) ]
438+ PartitionKeyExtraction ,
439+
440440 #[ error( "Serializing values failed: {0} " ) ]
441441 SerializationError ( #[ from] SerializationError ) ,
442442
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ use uuid::Uuid;
1414
1515use super :: { PageSize , StatementConfig } ;
1616use crate :: client:: execution_profile:: ExecutionProfileHandle ;
17- use crate :: errors:: { BadQuery , ExecutionError , ProtocolError } ;
17+ use crate :: errors:: { BadQuery , ExecutionError } ;
1818use crate :: frame:: response:: result:: PreparedMetadata ;
1919use crate :: frame:: types:: { Consistency , SerialConsistency } ;
2020use crate :: observability:: history:: HistoryListener ;
@@ -498,7 +498,7 @@ impl PartitionKeyError {
498498 pub fn into_execution_error ( self ) -> ExecutionError {
499499 match self {
500500 PartitionKeyError :: PartitionKeyExtraction ( _) => {
501- ExecutionError :: ProtocolError ( ProtocolError :: PartitionKeyExtraction )
501+ ExecutionError :: BadQuery ( BadQuery :: PartitionKeyExtraction )
502502 }
503503 PartitionKeyError :: TokenCalculation ( TokenCalculationError :: ValueTooLong (
504504 values_len,
You can’t perform that action at this time.
0 commit comments