From 84caff0c6764a4cca665aa7c9bf240b1c57d6e87 Mon Sep 17 00:00:00 2001 From: Tim Burks Date: Sat, 29 Jul 2023 15:17:48 -0700 Subject: [PATCH] ignore "unrecognized type" errors --- lex/util/decoder.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lex/util/decoder.go b/lex/util/decoder.go index b827835c1..d7416b624 100644 --- a/lex/util/decoder.go +++ b/lex/util/decoder.go @@ -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) @@ -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)