File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11//! Utility functions for async operations and coroutine execution.
22
3- use log:: { debug , warn} ;
3+ use log:: warn;
44use starknet:: core:: types:: StarknetError ;
55use starknet:: providers:: ProviderError ;
66use std:: future:: Future ;
8484 match f ( ) . await {
8585 Ok ( result) => {
8686 if attempts > 1 {
87- debug ! ( "{operation_name}: succeeded after {attempts} attempts" ) ;
87+ warn ! ( "{operation_name}: succeeded after {attempts} attempts" ) ;
8888 }
8989 return Ok ( result) ;
9090 }
9898 if !is_retryable || attempts >= MAX_RETRY_ATTEMPTS {
9999 if attempts > 1 {
100100 warn ! ( "{operation_name}: failed after {attempts} attempts with error: {e:?}" ) ;
101+ } else {
102+ warn ! (
103+ "{operation_name}: failed on first attempt with error: {e:?} (retryable: {is_retryable})"
104+ ) ;
101105 }
102106 return Err ( e) ;
103107 }
You can’t perform that action at this time.
0 commit comments