DCausse has uploaded a new change for review. https://gerrit.wikimedia.org/r/317529
Change subject: [completion] Properly fail if the response is not ok. ...................................................................... [completion] Properly fail if the response is not ok. It's still unclear when this can happen but it's a plausible cause for the error: Argument 2 passed to SearchEngine::processCompletionResults() must be an instance of SearchSuggestionSet, Elastica\Response in SearchEngine class Bug: T148978 Change-Id: Ic2042fa1773901072a8964404b8a5a9ea4380d29 --- M includes/CompletionSuggester.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/29/317529/1 diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php index 0906e8b..b1a5f4d 100644 --- a/includes/CompletionSuggester.php +++ b/includes/CompletionSuggester.php @@ -223,8 +223,13 @@ $result = $index->request( "_suggest", Request::POST, $suggest, $queryOptions ); if( $result->isOk() ) { $result = $this->postProcessSuggest( $result, $profiles, $log ); + return $this->success( $result ); + } else { + throw new \Elastica\Exception\ResponseException( + new Request( "_suggest", Request::POST, $suggest, $queryOptions ), + $result + ); } - return $this->success( $result ); } catch ( \Elastica\Exception\ExceptionInterface $e ) { return $this->failure( $e ); } -- To view, visit https://gerrit.wikimedia.org/r/317529 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic2042fa1773901072a8964404b8a5a9ea4380d29 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: DCausse <dcau...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits