-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: improve dfx deploy message. #3967
Conversation
Is information about the rootkey at all relevent to the user? I'm wondering if we could streamline the message even further to something like this:
|
|
use dfx_core::network::root_key; | ||
|
||
pub async fn fetch_root_key_if_needed(env: &dyn Environment) -> DfxResult { | ||
let agent = env.get_agent(); | ||
let network = env.get_network_descriptor(); | ||
root_key::fetch_root_key_when_non_mainnet(agent, network).await?; | ||
root_key::fetch_root_key_when_non_mainnet(agent, network).await | ||
.map_err(|e| anyhow!("Failed to fetch the root key, did you run 'dfx start' to start the local replica?\n{}", e))?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at DiagnosedError. It may provide even more readable output, by first displaying the error, then displaying the explanation, and finally displaying a suggested action. You'd add it here with something like .context(DiagnosedError::new(...))
.
I'll close this pr as this issue has been addressed by this pr #3973. |
Description
Improve
dfx deploy
error message to let users know what to do next.Fixes # (issue)
SDK-1858
How Has This Been Tested?
Added an e2e test.
Checklist: