Skip to content

Commit

Permalink
ignore "unrecognized type" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks committed Jul 29, 2023
1 parent fdb5f97 commit 84caff0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lex/util/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func JsonDecodeValue(b []byte) (any, error) {

t, ok := lexTypesMap[tstr]
if !ok {
return nil, fmt.Errorf("unrecognized type: %q", tstr)
return nil, nil // fmt.Errorf("unrecognized type: %q", tstr)
}

val := reflect.New(t)
Expand Down Expand Up @@ -102,6 +102,9 @@ func (ltd *LexiconTypeDecoder) UnmarshalJSON(b []byte) error {
if err != nil {
return err
}
if val == nil {
return nil
}

ltd.Val = val.(cbg.CBORMarshaler)

Expand Down

1 comment on commit 84caff0

@timburks
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed here

Please sign in to comment.