You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If base64 decode fails this produces an error message like:
Error reading config [config.json]: Invalid byte 43, offset 68. at line 2 column 1608
which is unclear on 2 points:
Invalid byte refers to an invalid base64 character and not an invalid json byte - but it's not clear what state the parser was in when the error was raised
The invalid byte 43 is neither at offset 68 into the file (that's the offset into the string value) nor at line 2 column 1608 (that's the end of the string value which is where serde points the error to)
Some of these are caused by the rather terse error message from the base64 crate, but making this a bit more verbose like "Failed to parse base64 value: Invalid byte... in string ending at line 2...." would be a lot more clear I think.
Getting the actual offset would be triply nice, not sure how doable that is though.
The text was updated successfully, but these errors were encountered:
Ah, so wrapping base64 errors in this crate (ideally with proper offset info, though I don't think serde makes that available) to make their provenance more clear?
Yeah, that would be great IMO if it's possible. I was mostly thinking of the confusion from an end user perspective (well, and me at the time) and I think there's not enough information available for the serde using code to separate/provide a clearer error message.
If base64 decode fails this produces an error message like:
which is unclear on 2 points:
Some of these are caused by the rather terse error message from the base64 crate, but making this a bit more verbose like "Failed to parse base64 value: Invalid byte... in string ending at line 2...." would be a lot more clear I think.
Getting the actual offset would be triply nice, not sure how doable that is though.
The text was updated successfully, but these errors were encountered: