use http::StatusCode; use thiserror::Error; pub type HttpResult = std::result::Result; /// Describes things that can go wrong in the handler #[derive(Debug, Error)] pub enum HttpError {} impl From for StatusCode { fn from(e: HttpError) -> StatusCode { match e { _ => StatusCode::INTERNAL_SERVER_ERROR, } } }