Only print raw malformed JSON body in debug level

Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
girlbossceo 2023-07-27 16:23:24 +00:00
parent 97835541ce
commit 1f867a2c86

View file

@ -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.")
})?;