-
Notifications
You must be signed in to change notification settings - Fork 968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message #2293
Comments
Believe me if we could improve this we would. You’ll find other issues saying similar things. The compiler simply doesn’t generate good errors for the kinds of trait implementations axum uses. The problem is not unique to axum and there is a rustc issue about it. We provide https://docs.rs/axum/0.6.20/axum/attr.debug_handler.html which helps in a lot of cases. |
Yes i mentioned that I tried that but it did not change the error message at all |
Ah I see. We probably should add special case for Extension and Clone. We do that for some other know types. I’ll make a separate issue for that! Update: Done #2294! |
``Hi, Im not sure whether to report this as bug report or request as a feature but I've spend like 3 hours figuring out what the issue is with my middleware and Extension extractor.
the issue is my User struct is not deriving Clone trait.. I'd say im intermediate in rust but i still cant read those errors and I tried #[debug_handler] but it didnt do anything
im not even joking when I say that my head hurts. I dont want others to experience this :)
Thank
The text was updated successfully, but these errors were encountered: