Ponysearch/searx
Markus Heiser 4845183128 [mod] don't dump traceback of SearxEngineResponseException on init
When initing engines a "SearxEngineResponseException" is logged very verbose,
including full traceback information:

    ERROR:searx.engines:yggtorrent engine: Fail to initialize
    Traceback (most recent call last):
      File "share/searx/searx/engines/__init__.py", line 293, in engine_init
        init_fn(get_engine_from_settings(engine_name))
      File "share/searx/searx/engines/yggtorrent.py", line 42, in init
        resp = http_get(url, allow_redirects=False)
      File "share/searx/searx/poolrequests.py", line 197, in get
        return request('get', url, **kwargs)
      File "share/searx/searx/poolrequests.py", line 190, in request
        raise_for_httperror(response)
      File "share/searx/searx/raise_for_httperror.py", line 60, in raise_for_httperror
        raise_for_captcha(resp)
      File "share/searx/searx/raise_for_httperror.py", line 43, in raise_for_captcha
        raise_for_cloudflare_captcha(resp)
      File "share/searx/searx/raise_for_httperror.py", line 30, in raise_for_cloudflare_captcha
        raise SearxEngineCaptchaException(message='Cloudflare CAPTCHA', suspended_time=3600 * 24 * 15)
    searx.exceptions.SearxEngineCaptchaException: Cloudflare CAPTCHA, suspended_time=1296000

For SearxEngineResponseException this is not needed.  Those types of exceptions
can be a normal use case.  E.g. for CAPTCHA errors like shown in the example
above. It should be enough to log a warning for such issues:

    WARNING:searx.engines:yggtorrent engine: Fail to initialize // Cloudflare CAPTCHA, suspended_time=1296000

closes: #2612

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-03-05 17:26:22 +01:00
..
answerers [fix] answers: don't crash when the query is an empty string 2021-03-01 10:52:39 +01:00
data Merge pull request #2632 from searx/update_data_update_wikidata_units.py 2021-03-05 11:59:44 +01:00
engines [mod] don't dump traceback of SearxEngineResponseException on init 2021-03-05 17:26:22 +01:00
metrology [fix] checker: fix engine statistics 2021-01-18 08:19:44 +01:00
plugins [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
search [mod] update currencies.json and fetch_currencies.py 2021-02-23 16:42:28 +01:00
shared [fix] checker: don't run the checker when uwsgi is not properly configured 2021-01-13 14:07:39 +01:00
static [mod] themes: remove legacy, courgette and pix-art themes 2020-12-17 11:33:28 +01:00
templates Merge pull request #2458 from MarcAbonce/hide-links-mobile2 2021-01-12 08:27:24 +01:00
translations [enh] update translations 2020-07-09 15:15:52 +02:00
__init__.py [mod] settings.yml: move brand settings to a dedicated section 2021-01-11 22:59:52 +01:00
autocomplete.py [enh] autocomplete refactoring, autocomplete on external bangs 2021-03-01 19:12:32 +01:00
exceptions.py [enh] add raise_for_httperror 2020-12-11 14:37:08 +01:00
external_bang.py [mod] add utils/fetch_external_bangs.py 2021-02-24 18:48:36 +01:00
external_urls.py [mod] add external_urls.json and wikidata_units.json 2020-10-28 08:09:25 +01:00
languages.py [data] make engines.languages 2021-01-24 09:52:32 +01:00
poolrequests.py [mod] poolrequests: for one (user request, engine) always use the same HTTPAdapter 2021-02-09 14:33:36 +01:00
preferences.py Patch advanced search preferences 2020-11-23 19:13:29 +01:00
query.py [enh] autocomplete refactoring, autocomplete on external bangs 2021-03-01 19:12:32 +01:00
raise_for_httperror.py [enh] add raise_for_httperror 2020-12-11 14:37:08 +01:00
results.py [mod] results: don't crash when an engine don't have a category 2020-12-10 10:57:07 +01:00
settings.yml [enh] google scholar - python implementation of the engine 2021-03-01 15:16:37 +01:00
settings_loader.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
settings_robot.yml Let admins lock user preferences 2020-10-25 18:06:18 +01:00
testing.py [py2to3] use unittest from py3, remove unittest2 from py2 2021-02-28 11:37:06 +01:00
utils.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
version.py prepare release 0.18.0 2020-12-14 19:03:09 +01:00
webadapter.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
webapp.py [enh] autocomplete refactoring, autocomplete on external bangs 2021-03-01 19:12:32 +01:00
webutils.py Updated webutils.highlight_content to ignore double-quotes when highlighting query parts 2021-02-08 23:58:54 -05:00