/// Necessary because of this issue: https://github.com/actix/actix-web/issues/1711 #[derive(Debug)] pub struct Error(anyhow::Error); impl From for Error where T: Into, { fn from(t: T) -> Self { Error(t.into()) } } mod axum { use super::Error; use axum::response::{IntoResponse, Response}; use http::StatusCode; impl IntoResponse for Error { fn into_response(self) -> Response { (StatusCode::INTERNAL_SERVER_ERROR, format!("{}", self.0)).into_response() } } }