/// Converts a result from the business logic into the appropriate tonic
/// status
Converts a result from the business logic into the appropriate tonic
status
Converts a result from the business logic into the appropriate tonic status
fn from(err: Error) -> Self {
        // An explicit match on the Error enum will ensure appropriate
        // logging is handled for any new error variants.
        let msg = "Error handling Flight gRPC request";
        match err {
            Error::DatabaseNotFound { .. }
            | Error::InvalidTicket { .. }
            | Error::InvalidTicketLegacy { .. }
            | Error::InvalidQuery { .. }
            // TODO(edd): this should be `debug`. Keeping at info whilst IOx still in early development
            | Error::InvalidDatabaseName { .. } => info!(?err, msg),
            Error::Query { .. } => info!(?err, msg),
            Error::Optimize { .. }
            | Error::Planning { .. } | Error::Serialization { .. } => warn!(?err, msg),
        }
        err.to_status()
    }
fn from ( err : Error ) -> Self { // An explicit match on the Error enum will ensure appropriate // logging is handled for any new error variants. let msg = " " ; match err { Error :: DatabaseNotFound { .. } | Error :: InvalidTicket { .. } | Error :: InvalidTicketLegacy { .. } | Error :: InvalidQuery { .. } // TODO(edd): this should be `debug`. Keeping at info whilst IOx still in early development | Error :: InvalidDatabaseName { .. } => info ! ( err msg ) , Error :: Query { .. } => info ! ( err msg ) , Error :: Optimize { .. } | Error :: Planning { .. } | Error :: Serialization { .. } => warn ! ( err msg ) , } err . to_status ( ) }
Converts a result from the business logic into the appropriate tonic
status
Converts a result from the business logic into the appropriate tonic status
err
Error