Create separate search_result_parser

This commit is contained in:
Zsombor Gegesy 2023-09-24 13:54:08 +02:00
parent 769d870803
commit 75a77d25f0
8 changed files with 110 additions and 62 deletions

View file

@ -85,12 +85,14 @@ impl EngineErrorInfo {
pub fn new(error: &EngineError, engine: &str) -> Self {
Self {
error: match error {
EngineError::EngineNotFound => "EngineNotFound".to_owned(),
EngineError::RequestError => "RequestError".to_owned(),
EngineError::EmptyResultSet => "EmptyResultSet".to_owned(),
EngineError::UnexpectedError => "UnexpectedError".to_owned(),
},
engine: engine.to_owned(),
severity_color: match error {
EngineError::EngineNotFound => "red".to_owned(),
EngineError::RequestError => "green".to_owned(),
EngineError::EmptyResultSet => "blue".to_owned(),
EngineError::UnexpectedError => "red".to_owned(),