XFFXFF commited on
Commit
1ebf888
1 Parent(s): 9a4cf94

log the error from engines

Browse files
src/search_results_handler/aggregator.rs CHANGED
@@ -58,8 +58,19 @@ pub async fn aggregate(
58
  searx::results(query, page, &user_agent)
59
  );
60
 
61
- let ddg_map_results: HashMap<String, RawSearchResult> = ddg_map_results?;
62
- let searx_map_results: HashMap<String, RawSearchResult> = searx_map_results?;
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  result_map.extend(ddg_map_results);
65
 
 
58
  searx::results(query, page, &user_agent)
59
  );
60
 
61
+ let ddg_map_results = ddg_map_results.unwrap_or_else(|e| {
62
+ if debug {
63
+ log::error!("Error fetching results from DuckDuckGo: {:?}", e);
64
+ }
65
+ HashMap::new()
66
+ });
67
+
68
+ let searx_map_results = searx_map_results.unwrap_or_else(|e| {
69
+ if debug {
70
+ log::error!("Error fetching results from Searx: {:?}", e);
71
+ }
72
+ HashMap::new()
73
+ });
74
 
75
  result_map.extend(ddg_map_results);
76