@@ -808,7 +808,7 @@ impl<C> Future for Request<C> {
808808 let request = this. request . as_mut ( ) . unwrap ( ) ;
809809 // TODO - would be nice if we didn't need to repeat this code twice, with & without retries.
810810 if request. retry >= this. retry_params . number_of_retries {
811- let next = if err. kind ( ) == ErrorKind :: ClusterConnectionNotFound {
811+ let next = if err. kind ( ) == ErrorKind :: AllConnectionsUnavailable {
812812 Next :: ReconnectToInitialNodes { request : None } . into ( )
813813 } else if matches ! ( err. retry_method( ) , crate :: types:: RetryMethod :: MovedRedirect )
814814 || matches ! ( target, OperationTarget :: NotFound )
@@ -836,7 +836,7 @@ impl<C> Future for Request<C> {
836836 }
837837 request. retry = request. retry . saturating_add ( 1 ) ;
838838
839- if err. kind ( ) == ErrorKind :: ClusterConnectionNotFound {
839+ if err. kind ( ) == ErrorKind :: AllConnectionsUnavailable {
840840 return Next :: ReconnectToInitialNodes {
841841 request : Some ( this. request . take ( ) . unwrap ( ) ) ,
842842 }
@@ -1255,7 +1255,7 @@ where
12551255 } else {
12561256 Err ( last_err. unwrap_or_else ( || {
12571257 (
1258- ErrorKind :: ClusterConnectionNotFound ,
1258+ ErrorKind :: AllConnectionsUnavailable ,
12591259 "Couldn't find any connection" ,
12601260 )
12611261 . into ( )
@@ -1651,7 +1651,7 @@ where
16511651 return OperationResult :: Err ( (
16521652 OperationTarget :: FanOut ,
16531653 (
1654- ErrorKind :: ClusterConnectionNotFound ,
1654+ ErrorKind :: AllConnectionsUnavailable ,
16551655 "No connections found for multi-node operation" ,
16561656 )
16571657 . into ( ) ,
@@ -1695,7 +1695,7 @@ where
16951695 )
16961696 } else {
16971697 let _ = sender. send ( Err ( (
1698- ErrorKind :: ClusterConnectionNotFound ,
1698+ ErrorKind :: ConnectionNotFoundForRoute ,
16991699 "Connection not found" ,
17001700 )
17011701 . into ( ) ) ) ;
@@ -1866,7 +1866,7 @@ where
18661866 && !RoutingInfo :: is_key_routing_command ( & routable_cmd. unwrap ( ) )
18671867 {
18681868 return Err ( (
1869- ErrorKind :: ClusterConnectionNotFound ,
1869+ ErrorKind :: ConnectionNotFoundForRoute ,
18701870 "Requested connection not found for route" ,
18711871 format ! ( "{route:?}" ) ,
18721872 )
@@ -1887,7 +1887,7 @@ where
18871887 return Ok ( ( address, conn. await ) ) ;
18881888 } else {
18891889 return Err ( (
1890- ErrorKind :: ClusterConnectionNotFound ,
1890+ ErrorKind :: ConnectionNotFoundForRoute ,
18911891 "Requested connection not found" ,
18921892 address,
18931893 )
@@ -1933,7 +1933,7 @@ where
19331933 . random_connections ( 1 , ConnectionType :: User )
19341934 . next ( )
19351935 . ok_or ( RedisError :: from ( (
1936- ErrorKind :: ClusterConnectionNotFound ,
1936+ ErrorKind :: AllConnectionsUnavailable ,
19371937 "No random connection found" ,
19381938 ) ) ) ?;
19391939 return Ok ( ( random_address, random_conn_future. await ) ) ;
0 commit comments