From 15edf3c38fe893751385489dda5b089e86fcbe77 Mon Sep 17 00:00:00 2001 From: Devashish Dixit Date: Wed, 28 Apr 2021 18:19:08 +0800 Subject: [PATCH] Add more details in error message for invalid vote option (#9185) Co-authored-by: Marko Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- x/gov/types/vote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/types/vote.go b/x/gov/types/vote.go index 6b7c1660d..97174fa66 100644 --- a/x/gov/types/vote.go +++ b/x/gov/types/vote.go @@ -89,7 +89,7 @@ func ValidWeightedVoteOption(option WeightedVoteOption) bool { func VoteOptionFromString(str string) (VoteOption, error) { option, ok := VoteOption_value[str] if !ok { - return OptionEmpty, fmt.Errorf("'%s' is not a valid vote option", str) + return OptionEmpty, fmt.Errorf("'%s' is not a valid vote option, available options: yes/no/no_with_veto/abstain", str) } return VoteOption(option), nil }