@@ -39,15 +39,6 @@ use crate::response::query_result::{IntoRowsResultError, SingleRowError};
3939#[ derive( Error , Debug , Clone ) ]
4040#[ non_exhaustive]
4141pub enum ExecutionError {
42- /// Failed to prepare the statement.
43- /// Applies to unprepared statements with non-empty value parameters.
44- #[ error( "Failed to prepare the statement: {0}" ) ]
45- PrepareError ( #[ from] PrepareError ) ,
46-
47- /// An error returned by last attempt of request execution.
48- #[ error( transparent) ]
49- LastAttemptError ( #[ from] RequestAttemptError ) ,
50-
5142 /// Caller passed an invalid query
5243 #[ error( transparent) ]
5344 BadQuery ( #[ from] BadQuery ) ,
@@ -61,14 +52,19 @@ pub enum ExecutionError {
6152 ) ]
6253 EmptyPlan ,
6354
64- /// A metadata error occurred during schema agreement.
65- #[ error( "Cluster metadata fetch error occurred during automatic schema agreement: {0}" ) ]
66- MetadataError ( #[ from] MetadataError ) ,
55+ /// Failed to prepare the statement.
56+ /// Applies to unprepared statements with non-empty value parameters.
57+ #[ error( "Failed to prepare the statement: {0}" ) ]
58+ PrepareError ( #[ from] PrepareError ) ,
6759
6860 /// Selected node's connection pool is in invalid state.
6961 #[ error( "No connections in the pool: {0}" ) ]
7062 ConnectionPoolError ( #[ from] ConnectionPoolError ) ,
7163
64+ /// An error returned by last attempt of request execution.
65+ #[ error( transparent) ]
66+ LastAttemptError ( #[ from] RequestAttemptError ) ,
67+
7268 /// Failed to run a request within a provided client timeout.
7369 #[ error(
7470 "Request execution exceeded a client timeout of {}ms" ,
@@ -83,6 +79,10 @@ pub enum ExecutionError {
8379 /// Failed to await automatic schema agreement.
8480 #[ error( "Failed to await schema agreement: {0}" ) ]
8581 SchemaAgreementError ( #[ from] SchemaAgreementError ) ,
82+
83+ /// A metadata error occurred during schema agreement.
84+ #[ error( "Cluster metadata fetch error occurred during automatic schema agreement: {0}" ) ]
85+ MetadataError ( #[ from] MetadataError ) ,
8686}
8787
8888impl From < SerializationError > for ExecutionError {
0 commit comments