File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -469,8 +469,16 @@ def _check_query_parser(param: str, value: Any):
469469 'Unknown sort order' in e .args [0 ]:
470470 raise SearchQueryError ('Invalid "sort" parameter' )
471471
472- if "Failed to connect to server" in e .args [0 ]:
473- log .warning ("Connection Error: Failed to connect to Solr server." )
472+ if "Failed to connect to server" in e .args [0 ] or \
473+ "Connection to server" in e .args [0 ]:
474+ log .error ("Connection Error: Failed to connect to Solr server." )
475+ raise SolrConnectionError ("Solr returned an error while searching." )
476+
477+ if "(HTTP 504)" in e .args [0 ] or \
478+ "(HTTP 503)" in e .args [0 ] or \
479+ "(HTTP 502)" in e .args [0 ] or \
480+ "(HTTP 401)" in e .args [0 ]:
481+ log .error (f"Connection Error: { e .args [0 ]} " )
474482 raise SolrConnectionError ("Solr returned an error while searching." )
475483
476484 raise SearchError ('SOLR returned an error running query: %r Error: %r' %
You can’t perform that action at this time.
0 commit comments