Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Treglia committed Mar 24, 2020
1 parent e5edca7 commit c8163ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/keys/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ func fetchKey(kb keys.Keybase, keyref string) (keys.Info, error) {
if err != nil {
return info, fmt.Errorf("not a valid name or address: %v", err)
}
info, err = kb.GetByAddress(accAddr)
return kb.GetByAddress(accAddr)
if err != nil {
return info, err
return info, fmt.Errorf("couldn't find key by either name or address: %v", err)
}
}
return info, nil
Expand Down

0 comments on commit c8163ba

Please sign in to comment.