1
0
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:
Darin
2019-04-10 15:45:13 -04:00
committed by Nikolay Kim
parent 9d82d4dfb9
commit 6ab9838977
3 changed files with 12 additions and 1 deletions

View File

@@ -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 {