Skip to content

chore (driver): include offending order UID in fulfillment error message #4414

@edjroz

Description

@edjroz

Background

In crates/driver/src/infra/solver/dto/solution.rs, when a solver returns a solution whose Fulfillment references an order UID that isn't present in the auction, the conversion to the domain model fails with the generic message:

invalid order UID specified in fulfillment

The offending UID itself is dropped. This error is surfaced to the solver via the notify mechanism in crates/driver/src/infra/solver/mod.rs as a DeserializationError, so when an operator receives the notification they cannot tell which of their fulfillments was rejected. A // TODO this error should reference the UID comment on line 52 already flags this gap.

Details

Include the offending UID (hex-encoded with 0x prefix) in the error string

Acceptance criteria

  • Order-UID lookup in Solutions::into_domain returns an error that
    includes the hex-encoded UID.
  • // TODO this error should reference the UID comment is removed.
  • Unit test asserts the offending UID appears in the error message.
  • The analogous gap in the liquidity-id lookup (solution.rs:201-206) is
    explicitly out of scope and left for a separate issue/PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions