Closed pnrobinson closed 1 year ago
@ielis thoughts?
The users who use low-level protobuf-java
have to cope with this scenario. As an alternative, we provide the phenopacket-tools-io module with PhenopacketParser that reads bytes, or an InputStream
into a Message
and produces more informative error messages.
This command
produces the following if we try to parse a v2 phenopacket
This is the expected behavior if we try to unpack the wrong kind of message, but the error message will not be helpful if people are not familiar with protobuf, and also the error message will be the same for any other kind of Message (not just v1 phenopacket). Therefore, it would be good to figure out a way to check if a message is v1 and if so to produce a special error message.