mirror of
https://github.com/searxng/searxng.git
synced 2026-09-11 16:56:05 +00:00
[mod] network: migrate to curl_cffi
This commit is contained in:
@@ -42,18 +42,17 @@ exception_classname_to_text = {
|
||||
None: gettext('unexpected crash'),
|
||||
'timeout': timeout_text,
|
||||
'asyncio.TimeoutError': timeout_text,
|
||||
'httpx.TimeoutException': timeout_text,
|
||||
'httpx.ConnectTimeout': timeout_text,
|
||||
'httpx.ReadTimeout': timeout_text,
|
||||
'httpx.WriteTimeout': timeout_text,
|
||||
'httpx.HTTPStatusError': gettext('HTTP error'),
|
||||
'httpx.ConnectError': gettext("HTTP connection error"),
|
||||
'httpx.RemoteProtocolError': http_protocol_error_text,
|
||||
'httpx.LocalProtocolError': http_protocol_error_text,
|
||||
'httpx.ProtocolError': http_protocol_error_text,
|
||||
'httpx.ReadError': network_error_text,
|
||||
'httpx.WriteError': network_error_text,
|
||||
'httpx.ProxyError': gettext("proxy error"),
|
||||
'curl_cffi.requests.exceptions.Timeout': timeout_text,
|
||||
'curl_cffi.requests.exceptions.ConnectTimeout': timeout_text,
|
||||
'curl_cffi.requests.exceptions.ReadTimeout': timeout_text,
|
||||
'curl_cffi.requests.exceptions.HTTPError': gettext('HTTP error'),
|
||||
'curl_cffi.requests.exceptions.ConnectionError': gettext("HTTP connection error"),
|
||||
'curl_cffi.requests.exceptions.DNSError': gettext("HTTP connection error"),
|
||||
'curl_cffi.requests.exceptions.IncompleteRead': http_protocol_error_text,
|
||||
'curl_cffi.requests.exceptions.SSLError': ssl_cert_error_text,
|
||||
'curl_cffi.requests.exceptions.CertificateVerifyError': ssl_cert_error_text,
|
||||
'curl_cffi.requests.exceptions.ProxyError': gettext("proxy error"),
|
||||
'curl_cffi.requests.exceptions.RequestException': network_error_text,
|
||||
'searx.exceptions.SearxEngineCaptchaException': gettext("CAPTCHA"),
|
||||
'searx.exceptions.SearxEngineTooManyRequestsException': gettext("too many requests"),
|
||||
'searx.exceptions.SearxEngineAccessDeniedException': gettext("access denied"),
|
||||
|
||||
Reference in New Issue
Block a user