Skip to content

Commit 700550d

Browse files
authored
Fix ignored errors from Unstringify. (#160)
* check forinvalid properties * fix typo
1 parent bf2629a commit 700550d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cfn/encoding/unmarshal.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ import (
77
// Unmarshal converts stringified-JSON into the passed-in type
88
func Unmarshal(data []byte, v interface{}) error {
99
var dataMap map[string]interface{}
10-
err := json.Unmarshal(data, &dataMap)
10+
var err error
11+
err = json.Unmarshal(data, &dataMap)
1112
if err != nil {
1213
return err
1314
}
1415

15-
Unstringify(dataMap, v)
16+
err = Unstringify(dataMap, v)
17+
if err != nil {
18+
return err
19+
}
1620

1721
return nil
1822
}

0 commit comments

Comments
 (0)