Add more details in error message for invalid vote option (#9185)
Co-authored-by: Marko <marbar3778@yahoo.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
This commit is contained in:
parent
e8e5c08655
commit
15edf3c38f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue