File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/CoreShop/Bundle/IndexBundle/Worker Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 3434use CoreShop \Component \Index \Worker \WorkerDeleteableByIdInterface ;
3535use CoreShop \Component \Registry \ServiceRegistryInterface ;
3636use OpenSearch \Client ;
37+ use OpenSearch \Common \Exceptions \Missing404Exception ;
3738use Pimcore \Tool ;
3839use Symfony \Component \EventDispatcher \GenericEvent ;
3940use Symfony \Component \String \Slugger \SluggerInterface ;
@@ -127,11 +128,8 @@ public function deleteIndexStructures(IndexInterface $index): void
127128 'index ' => $ this ->getIndexName ($ index ->getName ()),
128129 ])
129130 ;
130- } catch (\Exception $ exception ) {
131- // If the index does not exist, we can ignore the exception
132- if ($ exception ->getCode () !== 404 ) {
133- throw $ exception ;
134- }
131+ } catch (Missing404Exception ) {
132+ // If the document does not exist, we can ignore the exception
135133 }
136134 }
137135
You can’t perform that action at this time.
0 commit comments