✨ feat: add images, error_box & new message when no results are provided (#185)
This commit is contained in:
parent
9fd8275b17
commit
c4935f202a
8 changed files with 67 additions and 4 deletions
|
@ -116,10 +116,12 @@ impl RawSearchResult {
|
|||
}
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct EngineErrorInfo {
|
||||
pub error: String,
|
||||
pub engine: String,
|
||||
pub severity_color: String,
|
||||
}
|
||||
|
||||
impl EngineErrorInfo {
|
||||
|
@ -131,6 +133,11 @@ impl EngineErrorInfo {
|
|||
EngineError::UnexpectedError => String::from("UnexpectedError"),
|
||||
},
|
||||
engine,
|
||||
severity_color: match error {
|
||||
EngineError::RequestError => String::from("green"),
|
||||
EngineError::EmptyResultSet => String::from("blue"),
|
||||
EngineError::UnexpectedError => String::from("red"),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue