You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: e2e/tests-dfx/error_context.bash
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -199,4 +199,15 @@ teardown() {
199
199
assert_command_fail dfx canister status hello_backend
200
200
assert_match "not part of the controllers"# this is part of the error explanation
201
201
assert_match "'dfx canister update-settings --add-controller <controller principal to add> <canister id/name or --all> \(--network ic\)'"# this is part of the solution
202
-
}
202
+
}
203
+
204
+
@test "bad wallet canisters get diagnosed" {
205
+
dfx_new hello
206
+
dfx_start
207
+
dfx deploy hello_backend --no-wallet
208
+
id=$(dfx canister id hello_backend)
209
+
dfx identity set-wallet "$id" --force
210
+
assert_command_fail dfx wallet balance
211
+
assert_contains "it did not contain a function that dfx was looking for"
})if reject_message.contains("Canister has no update method 'wallet_") => true,
95
+
AgentError::UncertifiedReject(RejectResponse{
96
+
reject_code:RejectCode::CanisterError,
97
+
reject_message,
98
+
..
99
+
})if reject_message.contains("Canister has no query method 'wallet_") => true,
100
+
_ => false,
101
+
}
102
+
}
103
+
85
104
fndiagnose_http_403() -> Diagnosis{
86
105
let error_explanation = "Each canister has a set of controllers. Only those controllers have access to the canister's management functions (like install_code or stop_canister).\n\
87
106
The principal you are using to call a management function is not part of the controllers.";
@@ -150,3 +169,21 @@ See also release notes: https://forum.dfinity.org/t/dfx-0-11-0-is-promoted-with-
0 commit comments