1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

Print unconfigured Data<T> type when attempting extraction (#1743)

Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
cquintana-verbio
2020-10-20 18:35:34 +02:00
committed by GitHub
parent f92742bdac
commit 98243db9f1
2 changed files with 6 additions and 2 deletions

View File

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