Skip to content
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

Update account not registered error with hint #632

Merged
merged 2 commits into from
Oct 5, 2020

Conversation

maaktweluit
Copy link
Contributor

To help users resolve this error themselves: Add a hint that solves this problem in 99% of the cases.

@maaktweluit maaktweluit requested review from 83tb, Wiezzel and a team October 2, 2020 09:15
@maaktweluit maaktweluit self-assigned this Oct 2, 2020
@maaktweluit maaktweluit changed the base branch from master to release/alpha.2-dece-mkt October 2, 2020 09:17
@@ -112,7 +112,7 @@ pub mod processor {
use ya_core_model::payment::public::SendError;

#[derive(thiserror::Error, Debug)]
#[error("Account not registered. platform={platform} address={address} mode={mode:?}")]
#[error("Account not registered. Hint: Did you run `yagna payment init -r` after restarting? platform={platform} address={address} mode={mode:?}")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag in the error message should depend on mode field. In case of receiving payments it's -p.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought this was not needed since -p is called by default

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's called by default but only for the default identity. It is possible to create a new identity and not call init.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good one! added the -r or -p dependent on the mode

@maaktweluit maaktweluit merged commit a160051 into release/alpha.2-dece-mkt Oct 5, 2020
@maaktweluit maaktweluit deleted the mwu/account-register-hint branch October 5, 2020 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants