pub fn new_internal_or_handler_error(error_data: Option<Value>, error_struct: Value) -> Self {
        if error_struct["name"] == "INTERNAL_ERROR" {
            let error_message = match error_struct["info"].get("error_message") {
                Some(Value::String(error_message)) => error_message.as_str(),
                _ => "InternalError happened during serializing InternalError",
            };
            Self::new_internal_error(error_data, error_message.to_string())
        } else {
            Self::new_handler_error(error_data, error_struct)
        }
    }
/// Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind
/// Returns HANDLER_ERROR if the error is not internal one
Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind
Returns HANDLER_ERROR if the error is not internal one
Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind Returns HANDLER_ERROR if the error is not internal one
pub fn new_internal_or_handler_error(error_data: Option<Value>, error_struct: Value) -> Self {
        if error_struct["name"] == "INTERNAL_ERROR" {
            let error_message = match error_struct["info"].get("error_message") {
                Some(Value::String(error_message)) => error_message.as_str(),
                _ => "InternalError happened during serializing InternalError",
            };
            Self::new_internal_error(error_data, error_message.to_string())
        } else {
            Self::new_handler_error(error_data, error_struct)
        }
    }
pub fn new_internal_or_handler_error ( error_data : Option < Value > , error_struct : Value ) -> Self { if error_struct [ " " ] == " " { let error_message = match error_struct [ " " ] . get ( " " ) { Some ( Value :: String ( error_message ) ) => error_message . as_str ( ) , _ => " " , } ; Self :: new_internal_error ( error_data , error_message . to_string ( ) ) } else { Self :: new_handler_error ( error_data , error_struct ) } }
Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind
Returns HANDLER_ERROR if the error is not internal one
Helper method to define extract INTERNAL_ERROR in separate RpcErrorKind Returns HANDLER_ERROR if the error is not internal one
error_data
Option<Value>
error_struct
Value