Skip to content

Commit

Permalink
more to SOLR connection error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
FuhuXia committed May 28, 2024
1 parent 2d73fff commit c4d316f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/lib/search/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit c4d316f

Please sign in to comment.