public function SearchSubscriber::postExecuteRequest in Acquia Connector 8
Validate response.
Parameters
\Drupal\search_api_solr\Solarium\EventDispatcher\EventProxy $event: postExecuteRequest event.
Throws
\Solarium\Exception\HttpException
File
- acquia_search/
src/ EventSubscriber/ SearchSubscriber.php, line 107
Class
- SearchSubscriber
- Extends Solarium plugin: authenticate, etc.
Namespace
Drupal\acquia_search\EventSubscriberCode
public function postExecuteRequest(EventProxy $event) {
// If no client exists, its not an acquia solr server.
if (!$this->client) {
return;
}
$response = $event
->getResponse();
if ($response
->getStatusCode() != 200) {
throw new HttpException($response
->getStatusMessage());
}
if ($event
->getRequest()
->getHandler() == 'admin/ping') {
return;
}
$this
->authenticateResponse($event
->getResponse(), $this->nonce, $this->uri);
}