From 215d909e5986600b8b9eeb07edfff7a90d8f75bb Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Mon, 17 Oct 2022 18:41:59 +0200 Subject: [PATCH] More debug info when try_from_http_request fails --- src/api/ruma_wrapper/axum.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index d056f3f2..3870250b 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -281,7 +281,10 @@ where debug!("{:?}", http_request); let body = T::try_from_http_request(http_request, &path_params).map_err(|e| { - warn!("{:?}\n{:?}", e, json_body); + warn!( + "try_from_http_request failed: {:?}\nJSON body: {:?}", + e, json_body + ); Error::BadRequest(ErrorKind::BadJson, "Failed to deserialize request.") })?;