From c4d316f86b1c367bbc527d9a74db727e97c295fd Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Tue, 28 May 2024 09:17:06 -0400 Subject: [PATCH] more to SOLR connection error handling --- ckan/lib/search/query.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckan/lib/search/query.py b/ckan/lib/search/query.py index 015041fd4b8..f82c2b5d538 100644 --- a/ckan/lib/search/query.py +++ b/ckan/lib/search/query.py @@ -474,7 +474,8 @@ def _check_query_parser(param: str, value: Any): 'Unknown sort order' in e.args[0]: raise SearchQueryError('Invalid "sort" parameter') - if "Failed to connect to server" in e.args[0]: + if "Failed to connect to server" in e.args[0] or \ + "Connection to server" in e.args[0]: log.warning("Connection Error: Failed to connect to Solr server.") raise SolrConnectionError("Solr returned an error while searching.")