Skip to content

Commit

Permalink
fix: adds continue statements during parsing errors
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
  • Loading branch information
jpower432 committed Jan 10, 2023
1 parent ce7550f commit 4e1f1a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nodes/descriptor/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ func Parse(in map[string]json.RawMessage) (*Properties, error) {
var f uorspec.File
if err := json.Unmarshal(prop, &f); err != nil {
errs = append(errs, ParseError{Key: key, Err: err})
continue
}
out.File = &f
default:
Expand Down Expand Up @@ -277,6 +278,7 @@ func Parse(in map[string]json.RawMessage) (*Properties, error) {

if err := jsonparser.ObjectEach(prop, handler); err != nil {
errs = append(errs, fmt.Errorf("key %s: %w", key, err))
continue
}

other[key] = set
Expand Down

0 comments on commit 4e1f1a2

Please sign in to comment.