-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Merged
acerone85
merged 29 commits into
master
from
1311-return-better-error-messages-from-p2p-requests-pt-2
Nov 14, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
ab26a0b
Add a module for versioning the request response protocols in the p2p…
acerone85 c9ba074
Record the latest compatible version for the request response protoco…
acerone85 b3d3219
P2PService uses peer manager information to determine the version of …
acerone85 8817d88
Remove argument from Protocol::V1 and minor improvements to tests
acerone85 2ad29e4
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 aedda11
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 1855350
Add changelog entry
acerone85 1fa98a4
Fix compilation error
acerone85 6cebf0e
Placate Clippy
acerone85 939939d
Version PostcardCodec
acerone85 e8c563c
Revert "Revert changes"
acerone85 f50a4d3
P2P Service: Add /fuel/req_res/0.0.2 that sends error codes in respon…
acerone85 77841f0
Prefer V2 over V1 when peers support both versions of the protocol
acerone85 7160034
Changelog
acerone85 b2b5b3c
PostcardProtocol default implementation is now derived
acerone85 93b4d06
Add tests to check serialization and deserialization of responses
acerone85 06e4177
Formatting
acerone85 24dd5db
Request/response: Return meaningful error codes wehen using version 0…
acerone85 1bc4253
Log response error codes as warnings
acerone85 a092a03
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 c76608b
Fix inconsistencies from git merge master
acerone85 aa79b3c
add changelog entry
acerone85 ea4842c
Remove default implementation for PostcardProtocol
acerone85 d10dca8
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 ea8666d
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 216dfb9
Fix tests compilation
acerone85 fd2ba04
Remove stale todos
acerone85 5ea9b30
Add unknown error code
acerone85 8ca1dba
Merge branch 'master' into 1311-return-better-error-messages-from-p2p…
acerone85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.