Skip to content

Commit

Permalink
[TRIVIAL] Fix API error message (#3246)
Browse files Browse the repository at this point in the history
# Description
The API expects camelCase query parameters and parses them into
snake_case Rust identifiers. Therefor the `API` actually expects the
query parameter `orderUid` and not `order_uid` which should be reflected
in the error message.

# Changes
Updated error message to be correct from the perspective of the API
consumer not the backend internals.
  • Loading branch information
MartinquaXD authored Jan 21, 2025
1 parent ab2f47c commit 9cf2e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/orderbook/src/api/get_trades.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Query {
match (self.order_uid.as_ref(), self.owner.as_ref()) {
(Some(_), None) | (None, Some(_)) => Ok(self.trade_filter()),
_ => Err(TradeFilterError::InvalidFilter(
"Must specify exactly one of owner and order_uid.".to_owned(),
"Must specify exactly one of owner or orderUid.".to_owned(),
)),
}
}
Expand Down

0 comments on commit 9cf2e35

Please sign in to comment.