-
Notifications
You must be signed in to change notification settings - Fork 132
More detailled reporting of errors from flavors #232
Copy link
Copy link
Open
Labels
Q2 '25 TriageItems tracked as part of https://github.com/jamesmunns/postcard/issues/241Items tracked as part of https://github.com/jamesmunns/postcard/issues/241postcard-2.0Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)
Metadata
Metadata
Assignees
Labels
Q2 '25 TriageItems tracked as part of https://github.com/jamesmunns/postcard/issues/241Items tracked as part of https://github.com/jamesmunns/postcard/issues/241postcard-2.0Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)Tracking issues for an eventual 2.0 version of the postcard wire format (not currently planned)
The
Flavortrait reports errors aspostcard::Error. This enum has no variant for indicating an error specifically originating from data handling from a flavor. There are variants likeSerializeBufferFullandSerdeSerCustombut they might be misleading.To illustrate this with an example for adding a MAC to postcard frames:
Today I spent some time debugging this because I fell for my own red herring
SerializeBufferFullwhen I was looking into the TX buffer in the first place where actually the mac computation failed. Strictly, the latter is neitherSerialializeBufferFull,SerializeSeqLengthUnknown, orSerdeSerCustom.Logging the error with
inspect_err, will provide at least a clue to the friendly reader. But this needs to be taken care of for every potential souce while converting the original error needs to be done anyways and gets checked by the compiler.