Print unconfigured AppData type

This commit is contained in:
Carlos Quintana 2020-10-19 16:14:46 +02:00
parent e563025b16
commit 634e3d81d2
1 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
use std::any::type_name;
use std::ops::Deref; use std::ops::Deref;
use std::sync::Arc; use std::sync::Arc;
@ -121,8 +122,9 @@ impl<T: ?Sized + 'static> FromRequest for Data<T> {
} else { } else {
log::debug!( log::debug!(
"Failed to construct App-level Data extractor. \ "Failed to construct App-level Data extractor. \
Request path: {:?}", Request path: {:?} (type: {})",
req.path() req.path(),
type_name::<T>(),
); );
err(ErrorInternalServerError( err(ErrorInternalServerError(
"App data is not configured, to configure use App::data()", "App data is not configured, to configure use App::data()",