(
State(state): State<Arc<AppState>>,
Path(uid): Path<OrderUid>,
)
| 10 | }; |
| 11 | |
| 12 | pub 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 | } |
nothing calls this directly
no test coverage detected