16
Lost on this Axum error... any thoughts?
(programming.dev)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
Have you tried using the
#[debug_handler]
macro onget_all_armies
? Without that macro handler errors don't tell you much more than "something isn't right".Generally this kind of error indicates some type in the handler signature doesn't implement a necessary trait. Maybe you accidentally lost an automatically-derived trait like
Send + Sync
? The macro is the easiest way to check.Oh man, I didn't know debug_handler existed. Sure enough I had a missing derived attribute... not sure how but Serde serialize and deserialize were missing, so when I was trying to return Ok(Json(army)) it was failing. Thanks so much!
You're welcome!