Server error if Elasticsearch is not running


Well-known member
Affected version
Enhanced search v2.2.2
If Elasticsearch is not running and you try to do a search the following server error is displayed:


If Elasticsearch is not running, it would be better to return this error phrase:

return $this->error(\XF::phrase('xfes_elasticsearch_server_could_not_be_reached'));
Last edited:


Well-known member
I believe XF only displays exceptions if DEBUG is enabled in your config.php. Otherwise it gives a less technical error.

Also. Normal users have no idea what ElasticSearch is and don’t care. All they need to know is that the page is temporarily unavailable.