mirror of
https://github.com/searxng/searxng.git
synced 2026-08-08 16:21:38 +00:00
[fix] engines: only print search traceback in debug mode
This commit is contained in:
@@ -255,11 +255,11 @@ class OnlineProcessor(EngineProcessor):
|
|||||||
except ssl.SSLError as e:
|
except ssl.SSLError as e:
|
||||||
# requests timeout (connect or read)
|
# requests timeout (connect or read)
|
||||||
self.handle_exception(result_container, e, suspend=True)
|
self.handle_exception(result_container, e, suspend=True)
|
||||||
self.logger.error("SSLError {}, verify={}".format(e, searx.network.get_network(self.engine.name).verify))
|
self.logger.debug("SSLError {}, verify={}".format(e, searx.network.get_network(self.engine.name).verify))
|
||||||
except (httpx.TimeoutException, asyncio.TimeoutError) as e:
|
except (httpx.TimeoutException, asyncio.TimeoutError) as e:
|
||||||
# requests timeout (connect or read)
|
# requests timeout (connect or read)
|
||||||
self.handle_exception(result_container, e, suspend=True)
|
self.handle_exception(result_container, e, suspend=True)
|
||||||
self.logger.error(
|
self.logger.debug(
|
||||||
"HTTP requests timeout (search duration : {0} s, timeout: {1} s) : {2}".format(
|
"HTTP requests timeout (search duration : {0} s, timeout: {1} s) : {2}".format(
|
||||||
default_timer() - start_time, timeout_limit, e.__class__.__name__
|
default_timer() - start_time, timeout_limit, e.__class__.__name__
|
||||||
)
|
)
|
||||||
@@ -267,7 +267,7 @@ class OnlineProcessor(EngineProcessor):
|
|||||||
except (httpx.HTTPError, httpx.StreamError) as e:
|
except (httpx.HTTPError, httpx.StreamError) as e:
|
||||||
# other requests exception
|
# other requests exception
|
||||||
self.handle_exception(result_container, e, suspend=True)
|
self.handle_exception(result_container, e, suspend=True)
|
||||||
self.logger.exception(
|
self.logger.debug(
|
||||||
"requests exception (search duration : {0} s, timeout: {1} s) : {2}".format(
|
"requests exception (search duration : {0} s, timeout: {1} s) : {2}".format(
|
||||||
default_timer() - start_time, timeout_limit, e
|
default_timer() - start_time, timeout_limit, e
|
||||||
)
|
)
|
||||||
@@ -278,7 +278,7 @@ class OnlineProcessor(EngineProcessor):
|
|||||||
SearxEngineAccessDeniedException,
|
SearxEngineAccessDeniedException,
|
||||||
) as e:
|
) as e:
|
||||||
self.handle_exception(result_container, e, suspend=True)
|
self.handle_exception(result_container, e, suspend=True)
|
||||||
self.logger.exception(e.message)
|
self.logger.debug(e.message)
|
||||||
except Exception as e: # pylint: disable=broad-except
|
except Exception as e: # pylint: disable=broad-except
|
||||||
self.handle_exception(result_container, e)
|
self.handle_exception(result_container, e)
|
||||||
self.logger.exception("exception : {0}".format(e))
|
self.logger.debug("exception : {0}".format(e))
|
||||||
|
|||||||
Reference in New Issue
Block a user