Skip to content

cli: Warn if identity not passed to registration - #518

Merged
zolia merged 2 commits into
mysteriumnetwork:masterfrom
tcharding:cli-registration
Nov 8, 2018
Merged

cli: Warn if identity not passed to registration#518
zolia merged 2 commits into
mysteriumnetwork:masterfrom
tcharding:cli-registration

Conversation

@tcharding

Copy link
Copy Markdown
Contributor

Currently when using the cli if a user enters the command registration
without passing an identity they will get the obscure error:

[WARNING] Something went wrong:  server response invalid: 500 Internal Server Error (http://127.0.0.1:4053/identities//registration). Possible error: authentication needed: password or unlock
» 1541471455617838612 [Error] [Tequilapi.Client] server response invalid: 500 Internal Server Error (http://127.0.0.1:4053/identities//registration). Possible error: authentication needed: password or unlock

There is no indication in the cli that an identity must be passed to
this command. We can make the user experience better by checking for
the identity and explicitly warning if not present.

Add warning if identity is not passed in a argument to registration.

With this applied we get:

» registration
[WARNING] Please supply identity

Signed-off-by: tcharding me@tobin.cc

Currently when using the cli if a user enters the command `registration`
without passing an identity they will get the obscure error:

	[WARNING] Something went wrong:  server response invalid: 500 Internal Server Error (http://127.0.0.1:4053/identities//registration). Possible error: authentication needed: password or unlock
	» 1541471455617838612 [Error] [Tequilapi.Client] server response invalid: 500 Internal Server Error (http://127.0.0.1:4053/identities//registration). Possible error: authentication needed: password or unlock

There is no indication in the cli that an identity must be passed to
this command.  We can make the user experience better by checking for
the identity and explicitly warning if not present.

Add warning if identity is not passed in a argument to `registration`.

Signed-off-by: tcharding <me@tobin.cc>

@soffokl soffokl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me.

@zolia
zolia merged commit 4b5f264 into mysteriumnetwork:master Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants