[#180] Better error message when validator information not found

pull/195/head
Janet Liang 5 years ago
parent 7dbc13e9a0
commit 9cf24373b3
  1. 6
      cmd/subcommands/validator.go

@ -43,7 +43,11 @@ var (
PreRunE: validateAddress,
RunE: func(cmd *cobra.Command, args []string) error {
noLatest = true
return request(rpc.Method.GetValidatorInformation, []interface{}{addr.address})
e := request(rpc.Method.GetValidatorInformation, []interface{}{addr.address})
if e != nil {
return fmt.Errorf("validator address not found: %s", addr.address)
}
return e
},
}, {
Use: "information-by-block-number",

Loading…
Cancel
Save