mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
use match name if possible in data debug log
This commit is contained in:
parent
231a24ef8d
commit
b4ff6addfe
@ -153,16 +153,15 @@ impl<T: ?Sized + 'static> FromRequest for Data<T> {
|
|||||||
ok(st.clone())
|
ok(st.clone())
|
||||||
} else {
|
} else {
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"Failed to construct Data extractor type: `{}`. For the Data extractor to work \
|
"Failed to extract `Data<{}>` for `{}` handler. For the Data extractor to work \
|
||||||
correctly, wrap the data with `Data::new()` and pass it to `App::app_data()`. \
|
correctly, wrap the data with `Data::new()` and pass it to `App::app_data()`. \
|
||||||
Ensure that types align in both the set and retrieve calls. \
|
Ensure that types align in both the set and retrieve calls.",
|
||||||
Request path: {}",
|
|
||||||
type_name::<T>(),
|
type_name::<T>(),
|
||||||
req.path()
|
req.match_name().unwrap_or_else(|| req.path())
|
||||||
);
|
);
|
||||||
|
|
||||||
err(ErrorInternalServerError(
|
err(ErrorInternalServerError(
|
||||||
"Requested application data is not configured. \
|
"Requested application data is not configured correctly. \
|
||||||
View/enable debug logs for more details.",
|
View/enable debug logs for more details.",
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user