Connection failure will crash the status report

Created on 17 November 2023, about 1 year ago
Updated 10 May 2024, 7 months ago

Problem/Motivation

While setting up a new server, I was puzzled that the status report from drush would crash completely, reporting an exception in a class "Connection.php". I quickly found this was because the firewall in front of elastic search had not been opened up yet for the new server. Instead of reporting this as an error, the ServerErrorResponseException thrown by the elasticsearch package is never caught.

Steps to reproduce

* Connect the connector to a service returning a 503, e.g. http://httpstat.us/503
* Visit Drupal's status report

Proposed resolution

Catch ServerErrorResponseExceptions in hook_requiremens() as well as NoNodesAvailableExceptions.

Remaining tasks

Create an MR.

User interface changes

Failed connections are now correctly reported.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Fixed

Version

7.1

Component

Code

Created by

🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024