EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/288540
Change subject: Simple hack to allow es2.x failures to be logged by master ...................................................................... Simple hack to allow es2.x failures to be logged by master Change-Id: I2c9fd0ee52c19616de9027749828b3694d3e8053 --- M includes/ElasticsearchIntermediary.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/40/288540/1 diff --git a/includes/ElasticsearchIntermediary.php b/includes/ElasticsearchIntermediary.php index 53fc182..0992324 100644 --- a/includes/ElasticsearchIntermediary.php +++ b/includes/ElasticsearchIntermediary.php @@ -552,6 +552,14 @@ } return 'Partial failure: ' . implode( ',', $message ); } + + // We must be talking to an es2.x cluster. Don't do anything particularly + // fancy, encode the error so it can be logged as a generic unknown error. + $error = $exception->getResponse()->getError(); + if ( is_array( $error ) ) { + return json_encode( $error ); + } + return $exception->getElasticsearchException()->getMessage(); } -- To view, visit https://gerrit.wikimedia.org/r/288540 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2c9fd0ee52c19616de9027749828b3694d3e8053 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits