Missing request extension. #2922
-
SummaryI am getting this error - but i have added extensions let hianime_cache = Arc::new(Mutex::new(HiAnime::new()));
let hianime = Arc::new(HiAnimeRust::new(Some(secret_config)));
let router = Router::new()
.layer(Extension(hianime))
.layer(Extension(hianime_cache)); axum version0.7.5 |
Beta Was this translation helpful? Give feedback.
Answered by
jplatte
Sep 21, 2024
Replies: 1 comment 2 replies
-
impl HiAnimeRust { |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That constructor is async, but you don't use
.await
wegen calling it, so you're adding a future to the request extensions rather than the object it produces.