Skip to content
Snippets Groups Projects

Adds a catch for the deleteObjects() exception to allow local node deletion...

2 unresolved threads
1 file
+ 10
1
Compare changes
  • Side-by-side
  • Inline
@@ -416,7 +416,16 @@ class SearchApiAlgoliaBackend extends BackendPluginBase implements PluginFormInt
@@ -416,7 +416,16 @@ class SearchApiAlgoliaBackend extends BackendPluginBase implements PluginFormInt
continue;
continue;
}
}
$response = $this->getAlgoliaIndex()->deleteObjects($ids);
try {
 
// Delete item in the index.
 
$this->getAlgoliaIndex()->deleteObjects($ids);
Please register or sign in to reply
 
} catch (\Exception $e) {
 
$this->getLogger()->error('Failed to connect to Algolia index while deleting indexed items, Error: @message', [
Please register or sign in to reply
 
'@message' => $e->getMessage(),
 
]);
 
 
continue;
 
}
if ($this->isDebugActive()) {
if ($this->isDebugActive()) {
$this->getLogger()->notice('Deletion requested for IDs: @ids on Algolia for Index: @index, Response: @response.', [
$this->getLogger()->notice('Deletion requested for IDs: @ids on Algolia for Index: @index, Response: @response.', [
Loading