SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] error recorder: avoid RuntimeError on some rare occasion
Alexandre Flament41f6359d06fd
diff --git a/searx/metrics/error_recorder.py b/searx/metrics/error_recorder.pyindex 6963cda2f..37594e5e8 100644--- a/searx/metrics/error_recorder.py+++ b/searx/metrics/error_recorder.py@@ -74,9 +74,11 @@ def get_request_exception_messages(exc: HTTPError)\status_code = Nonereason = Nonehostname = None- if hasattr(exc, 'request') and exc.request is not None:+ if hasattr(exc, '_request') and exc._request is not None:+ # exc.request is property that raise an RuntimeException+ # if exc._request is not defined.url = exc.request.url- if url is None and hasattr(exc, 'response') and exc.respones is not None:+ if url is None and hasattr(exc, 'response') and exc.response is not None:url = exc.response.urlif url is not None:hostname = url.host