Skip to content

Commit

Permalink
dont swallow misconfigured wallet errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 committed Jan 9, 2024
1 parent 280868e commit c0abc6e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/dfx/src/commands/canister/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::lib::ic_attributes::{
get_compute_allocation, get_freezing_threshold, get_memory_allocation,
get_reserved_cycles_limit, CanisterSettings,
};
use crate::lib::identity::wallet::get_or_create_wallet_canister;
use crate::lib::identity::wallet::{get_or_create_wallet_canister, GetOrCreateWalletCanisterError};
use crate::lib::operations::canister::create_canister;
use crate::lib::operations::cycles_ledger::CYCLES_LEDGER_ENABLED;
use crate::lib::root_key::fetch_root_key_if_needed;
Expand Down Expand Up @@ -127,10 +127,15 @@ pub async fn exec(
call_sender = &proxy_sender;
}
Err(err) => {
if CYCLES_LEDGER_ENABLED {
if CYCLES_LEDGER_ENABLED
&& matches!(
err,
GetOrCreateWalletCanisterError::NoWalletConfigured { .. }
)
{
debug!(env.get_logger(), "No wallet configured.");
} else {
return Err(err.into());
bail!(err)
}
}
};
Expand Down

0 comments on commit c0abc6e

Please sign in to comment.