1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-30 18:34:36 +01:00
This commit is contained in:
Nikolay Kim 2019-04-10 15:05:03 -07:00
parent 6b42b2aaee
commit 52aebb3bca
4 changed files with 16 additions and 6 deletions

View File

@ -29,6 +29,7 @@ members = [
"awc",
"actix-http",
"actix-files",
"actix-framed",
"actix-session",
"actix-multipart",
"actix-web-actors",

View File

@ -96,8 +96,11 @@ impl<T: 'static, P> FromRequest<P> for Data<T> {
if let Some(st) = req.app_config().extensions().get::<Data<T>>() {
Ok(st.clone())
} else {
log::debug!("Failed to construct App-level Data extractor. \
Request path: {:?}", req.path());
log::debug!(
"Failed to construct App-level Data extractor. \
Request path: {:?}",
req.path()
);
Err(ErrorInternalServerError(
"App data is not configured, to configure use App::data()",
))

View File

@ -185,8 +185,11 @@ where
JsonBody::new(req, payload)
.limit(limit)
.map_err(move |e| {
log::debug!("Failed to deserialize Json from payload. \
Request path: {:?}", path);
log::debug!(
"Failed to deserialize Json from payload. \
Request path: {:?}",
path
);
if let Some(err) = err {
(*err)(e, &req2)
} else {

View File

@ -123,8 +123,11 @@ where
serde_urlencoded::from_str::<T>(req.query_string())
.map(|val| Ok(Query(val)))
.unwrap_or_else(|e| {
log::debug!("Failed during Query extractor deserialization. \
Request path: {:?}", req.path());
log::debug!(
"Failed during Query extractor deserialization. \
Request path: {:?}",
req.path()
);
Err(e.into())
})
}