chore: include offending order UID in fulfillment error message#4415
Open
edjroz wants to merge 2 commits into
Open
chore: include offending order UID in fulfillment error message#4415edjroz wants to merge 2 commits into
edjroz wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the order lookup logic into a dedicated find_order helper function, which now includes the order UID in error messages for better traceability. A unit test was also added to ensure the error message correctly contains the UID. No critical issues found.
jmg-duarte
reviewed
May 18, 2026
Comment on lines
+296
to
+300
| let uid: competition::order::Uid = uid.into(); | ||
| super::Error(format!( | ||
| "invalid order UID specified in fulfillment: {}", | ||
| uid.0 | ||
| )) |
Contributor
There was a problem hiding this comment.
Won't uid.0 be rendered in hex and as such couldn't we just do:
Suggested change
| let uid: competition::order::Uid = uid.into(); | |
| super::Error(format!( | |
| "invalid order UID specified in fulfillment: {}", | |
| uid.0 | |
| )) | |
| super::Error(format!( | |
| "invalid order UID specified in fulfillment: {}", | |
| uid.0 | |
| )) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
When
Solutions::into_domainincrates/driver/src/infra/solver/dto/solution.rsrejects a fulfillment whose order UID isn't in the auction, the error string was generic:invalid order UID specified in fulfillment
The UID itself was dropped. Since this error is surfaced to solver operators via the
notifymechanism as aDeserializationError, operators had no way to tell which of their fulfillments was rejected. A// TODO this error should reference the UIDcomment on line 52 already flagged this gap.Changes
find_orderhelper.invalid order UID specified in fulfillment: 0xabab…ab.message.
How to test
cargo test -p driver --lib fulfillment_unknown_uid_error_includes_uidRelated Issues
Fixes #4414