Skip to content

Commit ee24d30

Browse files
authored
MAGETWO-80229: Vague error message for invalid url_key for category #11049
2 parents 097ca09 + ef66188 commit ee24d30

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@ protected function createCategory($name, $parentId)
118118
$category->setIsActive(true);
119119
$category->setIncludeInMenu(true);
120120
$category->setAttributeSetId($category->getDefaultAttributeSetId());
121-
$category->save();
122-
$this->categoriesCache[$category->getId()] = $category;
121+
try {
122+
$category->save();
123+
$this->categoriesCache[$category->getId()] = $category;
124+
} catch (\Exception $e) {
125+
$this->addFailedCategory($category, $e);
126+
}
123127

124128
return $category->getId();
125129
}

0 commit comments

Comments
 (0)