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); debug!("{:?}", http_request);
let body = T::try_from_http_request(http_request, &path_params).map_err(|e| { let body = T::try_from_http_request(http_request, &path_params).map_err(|e| {
warn!( warn!("try_from_http_request failed: {:?}", e);
"try_from_http_request failed: {:?}\nJSON body: {:?}", debug!("JSON body: {:?}", json_body);
e, json_body
);
Error::BadRequest(ErrorKind::BadJson, "Failed to deserialize request.") Error::BadRequest(ErrorKind::BadJson, "Failed to deserialize request.")
})?; })?;