Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | search_api_solr-catch-internal-exceptions-2577041-3.patch | 534 bytes | TuWebO |
Comments
Comment #2
BerdirAh, 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.
Comment #3
TuWebO CreditAttribution: TuWebO at Metadrop commentedHello,
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?
Comment #4
drunken monkeyFor 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.
Comment #5
TuWebO CreditAttribution: TuWebO at Metadrop commentedThanks for the review @drunkenmonkey.
Comment #7
drunken monkeyThank you for the patch!
Since it seems no-one wants to object, I've committed it.
Thanks again!