We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e885088 commit 20d517dCopy full SHA for 20d517d
app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Edit.php
@@ -55,7 +55,15 @@ public function __construct(
55
public function execute()
56
{
57
$this->_setTypeId();
58
- $attributeSet = $this->attributeSetRepository->get($this->getRequest()->getParam('id'));
+
59
+ try {
60
+ $attributeSet = $this->attributeSetRepository->get($this->getRequest()->getParam('id'));
61
+ } catch (NoSuchEntityException $e) {
62
+ $this->messageManager->addErrorMessage(__('Could not load attribute set.'));
63
64
+ return $this->_redirect('*/*/');
65
+ }
66
67
if (!$attributeSet->getId()) {
68
return $this->resultRedirectFactory->create()->setPath('catalog/*/index');
69
}
0 commit comments