From 1f867a2c867c2ce84558e11e3dc8fa49060c21b4 Mon Sep 17 00:00:00 2001 From: girlbossceo Date: Thu, 27 Jul 2023 16:23:24 +0000 Subject: [PATCH] Only print raw malformed JSON body in debug level Signed-off-by: girlbossceo --- src/api/ruma_wrapper/axum.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index 069e12b3..bbd48614 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -292,10 +292,8 @@ where debug!("{:?}", http_request); let body = T::try_from_http_request(http_request, &path_params).map_err(|e| { - warn!( - "try_from_http_request failed: {:?}\nJSON body: {:?}", - e, json_body - ); + warn!("try_from_http_request failed: {:?}", e); + debug!("JSON body: {:?}", json_body); Error::BadRequest(ErrorKind::BadJson, "Failed to deserialize request.") })?;