File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ CLI flag.
107107### Gaia
108108
109109* [ \# 3777] ( https://github.com/cosmso/cosmos-sdk/pull/3777 ) ` gaiad export ` no longer panics when the database is empty
110+ * [ \# 3806] ( https://github.com/cosmos/cosmos-sdk/pull/3806 ) Properly return errors from a couple of struct Unmarshal functions
110111
111112### SDK
112113
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ func (va *ValAddress) UnmarshalJSON(data []byte) error {
279279
280280 err := json .Unmarshal (data , & s )
281281 if err != nil {
282- return nil
282+ return err
283283 }
284284
285285 va2 , err := ValAddressFromBech32 (s )
@@ -415,7 +415,7 @@ func (ca *ConsAddress) UnmarshalJSON(data []byte) error {
415415
416416 err := json .Unmarshal (data , & s )
417417 if err != nil {
418- return nil
418+ return err
419419 }
420420
421421 ca2 , err := ConsAddressFromBech32 (s )
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ func (vo *VoteOption) UnmarshalJSON(data []byte) error {
135135 var s string
136136 err := json .Unmarshal (data , & s )
137137 if err != nil {
138- return nil
138+ return err
139139 }
140140
141141 bz2 , err := VoteOptionFromString (s )
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ func (pt *ProposalKind) UnmarshalJSON(data []byte) error {
206206 var s string
207207 err := json .Unmarshal (data , & s )
208208 if err != nil {
209- return nil
209+ return err
210210 }
211211
212212 bz2 , err := ProposalTypeFromString (s )
@@ -307,7 +307,7 @@ func (status *ProposalStatus) UnmarshalJSON(data []byte) error {
307307 var s string
308308 err := json .Unmarshal (data , & s )
309309 if err != nil {
310- return nil
310+ return err
311311 }
312312
313313 bz2 , err := ProposalStatusFromString (s )
You can’t perform that action at this time.
0 commit comments