Skip to content

Commit

Permalink
[TASK] Log solr response in case of Page indexing issue
Browse files Browse the repository at this point in the history
Logging the response eases debugging.
Integrators and developers can check the response in order to retrieve
the actual reported issue, a crucial info in order to fix indexing
issues.

By: @DanielSiepmann
Fixes: #3846, #2590
  • Loading branch information
DanielSiepmann authored Oct 26, 2023
1 parent 8bfcb60 commit 8bc498e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Classes/IndexQueue/FrontendHelper/PageIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ protected function addDocumentsToSolrIndex(array $documents): bool
foreach ($documentChunks as $documentChunk) {
$response = $this->solrConnection->getWriteService()->addDocuments($documentChunk);
if ($response->getHttpStatus() != 200) {
$this->logger->error('Solr could not index page.', [$response->getRawResponse()]);
throw new \RuntimeException('Solr Request failed.', 1331834983);
}
}
Expand Down

0 comments on commit 8bc498e

Please sign in to comment.