MCPcopy Create free account
hub / github.com/cowprotocol/services / debug_order_handler

Function debug_order_handler

crates/orderbook/src/api/debug_order.rs:12–28  ·  view source on GitHub ↗
(
    State(state): State<Arc<AppState>>,
    Path(uid): Path<OrderUid>,
)

Source from the content-addressed store, hash-verified

10};
11
12pub async fn debug_order_handler(
13 State(state): State<Arc<AppState>>,
14 Path(uid): Path<OrderUid>,
15) -> Response {
16 match state.database_read.fetch_debug_report(&uid).await {
17 Ok(Some(report)) => (StatusCode::OK, Json(report)).into_response(),
18 Ok(None) => (
19 StatusCode::NOT_FOUND,
20 super::error("NotFound", "order not found"),
21 )
22 .into_response(),
23 Err(err) => {
24 tracing::error!(?err, "failed to fetch debug report");
25 crate::api::internal_error_reply()
26 }
27 }
28}

Callers

nothing calls this directly

Calls 4

internal_error_replyFunction · 0.85
fetch_debug_reportMethod · 0.80
errorFunction · 0.50
into_responseMethod · 0.45

Tested by

no test coverage detected