Skip to content

Conversation

@awann-4ai
Copy link
Collaborator

Fixes the error message that is shown when parsing a NbsWritePacket type with a subtype field that is the wrong type or explicitly set as undefined.

It would previously print the error message "invalid type for argument `packet`: A number was expected". These changes make it now print "invalid type for argument `packet`: expected `subtype` to be a number".

@JosephusPaye
Copy link
Collaborator

JosephusPaye commented Jan 29, 2025

If we're making the subtype required, change the type in NbsWritePacket to reflect that too.

But I think it would be better to keep it optional from the outside and default it to zero before passing it to C++.

Edit: looks like your changes do make it behave as described above. We may just need a test with subtype excluded and subtype set to undefined - this could be done with extra packets in the roundtrip test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants