summaryrefslogtreecommitdiff
path: root/searx/results.py
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2020-03-29 13:14:06 +0200
committerNoémi Ványi <sitbackandwait@gmail.com>2020-05-31 19:17:48 +0200
commite3282748d0433d455336487f7e36b789fe6ade30 (patch)
tree521fbd7806bf636bdf09c5e2f9be4d4fa2493e8d /searx/results.py
parentd38952c1335d3c6f8615870b11ef9737b203ad49 (diff)
add display_error_messages option to engine settings
A new option is added to engines to hide error messages from users. It is called `display_error_messages` and by default it is set to `True`. If it is set to `False` error messages do not show up on the UI. Keep in mind that engines are still suspended if needed regardless of this setting. Closes #1828
Diffstat (limited to 'searx/results.py')
-rw-r--r--searx/results.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/results.py b/searx/results.py
index 02ab9efb..62a01a5b 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -346,7 +346,8 @@ class ResultContainer(object):
return resultnum_sum / len(self._number_of_results)
def add_unresponsive_engine(self, engine_name, error_type, error_message=None):
- self.unresponsive_engines.add((engine_name, error_type, error_message))
+ if engines[engine_name].display_error_messages:
+ self.unresponsive_engines.add((engine_name, error_type, error_message))
def add_timing(self, engine_name, engine_time, page_load_time):
self.timings.append({