mattporritt / moodle-search_elastic

An Elasticsearch engine plugin for Moodle's Global Search
https://moodle.org/plugins/search_elastic
GNU General Public License v3.0
16 stars 13 forks source link

Upgrade fails if invalid index url #44

Closed tomdickman closed 5 years ago

tomdickman commented 5 years ago

It has been noted that if there is no pre-existing Moodle configuration for Elastic Search and the default config values fail to resolve to a response, this will instead return a new \search_elastic\guzzle_exception() which does not contain a getBody() method, thereby breaking the \search_elastic\engine method validate_index()

Here is a stack trace from an upgrade on a Moodle instance:

Default exception handler: Exception - Call to undefined method search_elastic\guzzle_exception::getBody() Debug: Error code: generalexceptionmessage

tomdickman commented 5 years ago

Closing as fixed by @andrewhancox, thanks for your help!