/// Logs and converts a result from the business logic into the appropriate tonic status
Logs and converts a result from the business logic into the appropriate tonic status
Logs and 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::InvalidTicket { .. }
            | Error::InvalidQuery { .. }
            | Error::Query { .. }
            | Error::NamespaceNotFound { .. }
            | Error::TableNotFound { .. } => {
                // TODO(edd): this should be `debug`. Keeping at info whilst IOx still in early
                // development
                info!(?err, msg)
            }
            Error::Optimize { .. } | Error::QueryStream { .. } | 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 :: InvalidTicket { .. } | Error :: InvalidQuery { .. } | Error :: Query { .. } | Error :: NamespaceNotFound { .. } | Error :: TableNotFound { .. } => { // TODO(edd): this should be `debug`. Keeping at info whilst IOx still in early // development info ! ( err msg ) } Error :: Optimize { .. } | Error :: QueryStream { .. } | Error :: Serialization { .. } => { warn ! ( err msg ) } } err . to_status ( ) }
Logs and converts a result from the business logic into the appropriate tonic status
Logs and converts a result from the business logic into the appropriate tonic status
err
Error