File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ pub enum ClientError {
83
83
/// Stacks node does not support a feature we need
84
84
#[ error( "Stacks node does not support a required feature: {0}" ) ]
85
85
UnsupportedStacksFeature ( String ) ,
86
+ /// Invalid response from the stacks node
87
+ #[ error( "Invalid response from the stacks node: {0}" ) ]
88
+ InvalidResponse ( String ) ,
86
89
}
87
90
88
91
/// Retry a function F with an exponential backoff and notification on transient failure
Original file line number Diff line number Diff line change @@ -297,8 +297,9 @@ impl RunLoop {
297
297
if info. reward_cycle != block_reward_cycle {
298
298
// If the stacks-node is still processing the burn block, the /v2/pox endpoint
299
299
// may return the previous reward cycle. In this case, we should retry.
300
- return Err ( backoff:: Error :: transient ( err_msg ! (
301
- "Received reward cycle info is not the new block's expected reward cycle. Try again."
300
+ return Err ( backoff:: Error :: transient ( ClientError :: InvalidResponse (
301
+ "Received reward cycle info does not match the current burn block height."
302
+ . to_string ( ) ,
302
303
) ) ) ;
303
304
}
304
305
Ok ( info)
You can’t perform that action at this time.
0 commit comments