std::io::Error
needs to implement IntoResponse in axum::response - Rust
You may want to use something like axum::http::Response<String>
for the error type. It will give you a lot of flexibility for error reporting to the client. But other types are possible, like (axum::http::StatusCode, String)
.