fn to_status(&self) -> tonic::Status {
        use tonic::Status;
        match &self {
            Self::InvalidTicket { .. } => Status::invalid_argument(self.to_string()),
            Self::InvalidTicketLegacy { .. } => Status::invalid_argument(self.to_string()),
            Self::InvalidQuery { .. } => Status::invalid_argument(self.to_string()),
            Self::DatabaseNotFound { .. } => Status::not_found(self.to_string()),
            Self::Query { .. } => Status::internal(self.to_string()),
            Self::InvalidDatabaseName { .. } => Status::invalid_argument(self.to_string()),
            Self::Planning {
                source: service_common::planner::Error::External(_),
            } => Status::internal(self.to_string()),
            Self::Planning { .. } => Status::invalid_argument(self.to_string()),
            Self::Optimize { .. } => Status::internal(self.to_string()),
            Self::Serialization { .. } => Status::internal(self.to_string()),
        }
    }
/// 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 to_status(&self) -> tonic::Status {
        use tonic::Status;
        match &self {
            Self::InvalidTicket { .. } => Status::invalid_argument(self.to_string()),
            Self::InvalidTicketLegacy { .. } => Status::invalid_argument(self.to_string()),
            Self::InvalidQuery { .. } => Status::invalid_argument(self.to_string()),
            Self::DatabaseNotFound { .. } => Status::not_found(self.to_string()),
            Self::Query { .. } => Status::internal(self.to_string()),
            Self::InvalidDatabaseName { .. } => Status::invalid_argument(self.to_string()),
            Self::Planning {
                source: service_common::planner::Error::External(_),
            } => Status::internal(self.to_string()),
            Self::Planning { .. } => Status::invalid_argument(self.to_string()),
            Self::Optimize { .. } => Status::internal(self.to_string()),
            Self::Serialization { .. } => Status::internal(self.to_string()),
        }
    }
fn to_status ( & self ) -> tonic :: Status { use tonic :: Status ; match & self { Self :: InvalidTicket { .. } => Status :: invalid_argument ( self . to_string ( ) ) , Self :: InvalidTicketLegacy { .. } => Status :: invalid_argument ( self . to_string ( ) ) , Self :: InvalidQuery { .. } => Status :: invalid_argument ( self . to_string ( ) ) , Self :: DatabaseNotFound { .. } => Status :: not_found ( self . to_string ( ) ) , Self :: Query { .. } => Status :: internal ( self . to_string ( ) ) , Self :: InvalidDatabaseName { .. } => Status :: invalid_argument ( self . to_string ( ) ) , Self :: Planning { source : service_common :: planner :: Error :: External ( _ ) , } => Status :: internal ( self . to_string ( ) ) , Self :: Planning { .. } => Status :: invalid_argument ( self . to_string ( ) ) , Self :: Optimize { .. } => Status :: internal ( self . to_string ( ) ) , Self :: Serialization { .. } => Status :: internal ( self . to_string ( ) ) , } }
Converts a result from the business logic into the appropriate tonic
status
Converts a result from the business logic into the appropriate tonic status
&self
&self