@@ -55,10 +55,10 @@ where
5555 // Check for tonic status errors.
5656 if let Some ( status) = e. downcast_ref :: < tonic:: Status > ( ) {
5757 match status. code ( ) {
58- Code :: Unavailable |
59- Code :: DeadlineExceeded |
60- Code :: Internal |
61- Code :: Aborted => {
58+ Code :: Unavailable
59+ | Code :: DeadlineExceeded
60+ | Code :: Internal
61+ | Code :: Aborted => {
6262 warn ! (
6363 "Network temporarily unavailable when {} due to {}, retrying..." ,
6464 operation_name,
@@ -83,14 +83,14 @@ where
8383 } else {
8484 // Check for common transport errors.
8585 let error_msg = e. to_string ( ) . to_lowercase ( ) ;
86- let is_transient = error_msg. contains ( "tls handshake" ) ||
87- error_msg. contains ( "dns error" ) ||
88- error_msg. contains ( "connection reset" ) ||
89- error_msg. contains ( "broken pipe" ) ||
90- error_msg. contains ( "transport error" ) ||
91- error_msg. contains ( "failed to lookup" ) ||
92- error_msg. contains ( "timeout" ) ||
93- error_msg. contains ( "deadline exceeded" ) ;
86+ let is_transient = error_msg. contains ( "tls handshake" )
87+ || error_msg. contains ( "dns error" )
88+ || error_msg. contains ( "connection reset" )
89+ || error_msg. contains ( "broken pipe" )
90+ || error_msg. contains ( "transport error" )
91+ || error_msg. contains ( "failed to lookup" )
92+ || error_msg. contains ( "timeout" )
93+ || error_msg. contains ( "deadline exceeded" ) ;
9494
9595 if is_transient {
9696 warn ! (
0 commit comments