From fef3e157c06d9ca9fb43abd6b07c5e5b9e22b4bb Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Tue, 27 Mar 2018 22:13:05 +0200 Subject: [PATCH] Capture & return data.ToJSON error --- server/show_validator.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/show_validator.go b/server/show_validator.go index cdbcc3631f..d2c7705d6c 100644 --- a/server/show_validator.go +++ b/server/show_validator.go @@ -31,7 +31,10 @@ func (s showValidator) run(cmd *cobra.Command, args []string) error { return err } privValidator := types.LoadOrGenPrivValidatorFS(cfg.PrivValidatorFile()) - pubKeyJSONBytes, _ := data.ToJSON(privValidator.PubKey) + pubKeyJSONBytes, err := data.ToJSON(privValidator.PubKey) + if err != nil { + return err + } fmt.Println(string(pubKeyJSONBytes)) return nil }