File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -110,24 +110,14 @@ fn local_replica_not_running(err: &AnyhowError) -> bool {
110110
111111fn not_a_controller ( err : & AgentError ) -> bool {
112112 // Newer replicas include the error code in the reject response.
113- if matches ! (
113+ matches ! (
114114 err,
115115 AgentError :: UncertifiedReject ( RejectResponse {
116116 reject_code: RejectCode :: CanisterError ,
117117 error_code: Some ( error_code) ,
118118 ..
119119 } ) if error_code == error_code:: CANISTER_INVALID_CONTROLLER
120- ) {
121- return true ;
122- }
123-
124- // Older replicas do not include the error code in the reject response.
125- // replica gives HTTP403, message looks like "Only controllers of canister bkyz2-fmaaa-aaaaa-qaaaq-cai can call ic00 method canister_status"
126- matches ! ( err, AgentError :: HttpError ( payload) if payload. status == 403
127- && matches!(
128- std:: str :: from_utf8( payload. content. as_slice( ) ) ,
129- Ok ( "Only controllers of canister" )
130- ) )
120+ )
131121}
132122
133123fn wallet_method_not_found ( err : & AgentError ) -> bool {
You can’t perform that action at this time.
0 commit comments