how to show errors in JS Alert
-
13-01-2021 - |
Solution
In your module controller
try {
//Your program logic
} catch (\Exception $e) {
$this->messageManager->addErrorMessage("Your error message{$e->getMessage()}.");
$this->_redirect('*/*/');
return;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange