When the Solr server is not reachable, instead of throwing Drupal\search_api\SearchApiException it throws Solarium\Exception\HttpException, which requires a generic handling approach in the search_api module.

Resolution: All exceptions need to be caught and re-thrown as Drupal\search_api\SearchApiException.

This issue blocks #2575651: Index page dies with WSOD if Solr not available

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cristiroma created an issue. See original summary.

Berdir’s picture

Ah, I knew I've seen this before. See #2639702: Wrong exception class in Search API Solr backend, not sure if there are others too that should be updated accordingly.

TuWebO’s picture

Hello,
Just added a patch for watch_dog loggin. Maybe it is useful to get the logs in the watchdog until we have better (or another) exception handling.
Do you guys think it is ok?

drunken monkey’s picture

Status: Active » Reviewed & tested by the community

For the ping() method, I'm not sure we need to do this. It's not really critical, there.
On the other hand, we already had the situation that everything worked fine except pinging (if the necessary admin handler isn't present), so I guess it might still be useful.

TuWebO’s picture

Thanks for the review @drunkenmonkey.

  • drunken monkey committed 7123d88 on 8.x-1.x authored by TuWebO
    Issue #2577041 by TuWebO: Added logging for exceptions caught during...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for the patch!
Since it seems no-one wants to object, I've committed it.
Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.