/**
  * {@inheritdoc}
  */
 public function execute()
 {
     parent::beforeExecute();
     $magentoCategories = $this->webservice->getCategoriesStatus();
     foreach ($magentoCategories as $category) {
         if (!$this->categoryMappingManager->magentoCategoryExists($category['category_id'], $this->getSoapUrl()) && !($category['level'] === '0' || $category['level'] === '1')) {
             try {
                 $this->handleCategoryNotInPimAnymore($category);
             } catch (SoapCallException $e) {
                 throw new InvalidItemException($e->getMessage(), [json_encode($category)]);
             }
         }
     }
 }