Skip to content
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

107 packet decode error #108

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
3 changes: 2 additions & 1 deletion EosLib/packet/packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def decode(packet_bytes: bytes):
decoded_data_header = decoded_data_header
packet_bytes = packet_bytes[struct.calcsize(DataHeader.data_header_struct_format_string):]
else:
raise PacketFormatError("Packet does not contain a header")
raise PacketFormatError(f"Packet does not contain a header. Unexpected packet header: {packet_bytes[0]}, \
should be: {HeaderPreamble.DATA}")

decoded_packet = Packet(EosLib.format.decode_factory.decode_factory.decode(decoded_data_header.data_type,
packet_bytes),
Expand Down
Loading