mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
added some error logging for extractors: Data, Json, Query, and Path (#765)
* added some error logging for extractors * changed log::error to log::debug and fixed position of log for path * added request path to debug logs
This commit is contained in:
@@ -179,10 +179,14 @@ where
|
||||
.map(|c| (c.limit, c.ehandler.clone()))
|
||||
.unwrap_or((32768, None));
|
||||
|
||||
let path = req.path().to_string();
|
||||
|
||||
Box::new(
|
||||
JsonBody::new(req, payload)
|
||||
.limit(limit)
|
||||
.map_err(move |e| {
|
||||
log::debug!("Failed to deserialize Json from payload. \
|
||||
Request path: {:?}", path);
|
||||
if let Some(err) = err {
|
||||
(*err)(e, &req2)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user