Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse error falls back to Invalid #1312
Parse error falls back to Invalid #1312
Changes from 1 commit
fa75ba1
c17a922
c2213ce
092d4bc
7613b89
5fe6616
893a6a6
465a6a9
2bc3417
d4b9784
5611749
b05b267
443b1a6
383870c
0402244
d2ee464
699036f
ef792bc
688c17d
602811f
0a81484
c1e4cc9
e89b957
b1e04b4
1250509
fa8a272
3b73f6e
509ebbf
09cc839
d051faf
58e9098
bfbde5f
c7d3da5
e5125b5
e50072e
9c8a412
96ea494
c979177
5698712
9a8bac0
c000e0a
8f6aebf
0d97927
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would mask malformed messages though? Like if the message type is a known message but the payload is too short. Then you'd have an
Unknown
message with a message type that corresponds to a known message which is a little odd. But maybe that's what we want, I guess it's a trade off between being lenient and surfacing errors betterThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea... think we're just treating Unknown as the
Frame
at this point to serialize as json :/although that makes sense for the purpose of the Unknown message i guess.
maybe a better compromise would to just add a flag like
strict
to address dropping payload errors?or maybe a 'from payload' like 'from fields' for json
issue with the raw decoder or persisting broken data is where do we actually trim the unnecessary data - which thought everything would propagate up to sbp converters and they would drop those - or maybe we should just never drop them 😱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the
Decoder
should only output valid SBP (as in CRC is good and the payload is correct), if a user wants access to potentially invalid messages they can go with theFramer
I think. So for examplesbp2json
should probably be doing something like