Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fuel/Request_Response v0.0.2: More meaningful error messages #2377
Fuel/Request_Response v0.0.2: More meaningful error messages #2377
Changes from 24 commits
ab26a0b
c9ba074
b3d3219
8817d88
2ad29e4
aedda11
1855350
1fa98a4
6cebf0e
939939d
e8c563c
f50a4d3
77841f0
7160034
b2b5b3c
93b4d06
06e4177
24dd5db
1bc4253
a092a03
c76608b
aa79b3c
ea4842c
d10dca8
ea8666d
216dfb9
fd2ba04
5ea9b30
8ca1dba
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, maybe we need to add
Unknown(u32)
for backward compatibility in the case if we can't deserialize the error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried something in 5ea9b30. There is an unknown variant, but the error code is erased away. The reason for this is that deserializing unknown values in serde has been recently implemented via the attribute
serde(untagged)
, but this is not supported by postcard (fails with errorWontImplement
). See serde-rs/serde#912 (comment) for the discussion onserde(untagged)
. There are other alternatives proposed, such as nested enums or custom deserialization functions for a variant, but they won't either work with postcard or are too complicated imho.Adding an
Unknown
variant which abstracts away the error code does at least ensure backwards compatibility.