mirror of
https://github.com/tokio-rs/axum.git
synced 2025-01-01 08:56:15 +01:00
Improve error for missing extension (#795)
This commit is contained in:
parent
e2dc6b3147
commit
8175b9108f
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ where
|
||||||
.get::<T>()
|
.get::<T>()
|
||||||
.ok_or_else(|| {
|
.ok_or_else(|| {
|
||||||
MissingExtension::from_err(format!(
|
MissingExtension::from_err(format!(
|
||||||
"Extension of type `{}` was not found. Perhaps you forgot to add it?",
|
"Extension of type `{}` was not found. Perhaps you forgot to add it? See `axum::AddExtensionLayer`.",
|
||||||
std::any::type_name::<T>()
|
std::any::type_name::<T>()
|
||||||
))
|
))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue