Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz committed Feb 21, 2025
1 parent 6d3243f commit 2b6b60a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/orderbook/src/api/get_settlement_executions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ pub fn get(db: Postgres) -> impl Filter<Extract = (super::ApiReply,), Error = Re
let result = db
.find_settlement_executions(from_auction, to_auction)
.await;

Result::<_, Infallible>::Ok(match result {
let response = match result {
Ok(executions) => reply::with_status(reply::json(&executions), StatusCode::OK),
Err(err) => {
tracing::error!(?err, "get_settlement_executions");
tracing::error!(
?err,
?from_auction,
?to_auction,
"Failed to fetch settlement executions"
);
crate::api::internal_error_reply()
}
})
};

Result::<_, Infallible>::Ok(response)
}
})
}

0 comments on commit 2b6b60a

Please sign in to comment.