Create separate search_result_parser
This commit is contained in:
parent
769d870803
commit
75a77d25f0
8 changed files with 110 additions and 62 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue