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

Handle error on Address not found #657

Merged
merged 1 commit into from
Oct 21, 2021
Merged

Conversation

mojtaba-esk
Copy link
Contributor

If we use a wallet address which does not exist, it gives the following error:

Error: empty address string is not allowed

which is coming from the SDK and confusing to the user.
The reason is because one error is not handled properly, in the new proposal, the error is handled which returns the following error if the address does not exist:

Error: The specified item could not be found in the keyring

If we use a wallet address which does not exist, it gives the following error: 
```
Error: empty address string is not allowed
```
which is coming from the SDK and confusing to the user. 
The reason is because one error is not handled properly, in the new proposal, the error is handled which returns the following error if the address does not exist:

```
Error: The specified item could not be found in the keyring
```
Copy link
Member

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Thanks for this.

@@ -57,6 +57,9 @@ func StoreCodeCmd() *cobra.Command {
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Looks like something a linter should have caught.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, this was caught by the linter. I marked this and other commands in #645.

@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #657 (0984aca) into master (dd390d7) will decrease coverage by 0.06%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #657      +/-   ##
==========================================
- Coverage   60.24%   60.18%   -0.07%     
==========================================
  Files          48       48              
  Lines        5313     5315       +2     
==========================================
- Hits         3201     3199       -2     
- Misses       1888     1891       +3     
- Partials      224      225       +1     
Impacted Files Coverage Δ
x/wasm/client/cli/tx.go 24.65% <0.00%> (-0.35%) ⬇️
x/wasm/keeper/keeper.go 86.97% <0.00%> (-0.34%) ⬇️

@ethanfrey ethanfrey merged commit c34b486 into CosmWasm:master Oct 21, 2021
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.

3 participants