in Controller/Adminhtml/Ajax/AbstractAjax.php [31:53]
public function execute()
{
$result = $this->_resultJsonFactory->create();
// TODO : Move all String objects to constants.
$admin_session = $this->_fbeHelper
->createObject(AdminSessionsManager::class)
->getCurrentSession();
if (!$admin_session && $admin_session->getStatus() != 1) {
throw new \Exception('Oops, this endpoint is for logged in admin and ajax only!');
} else {
try {
$json = $this->executeForJson();
return $result->setData($json);
} catch (\Exception $e) {
// Uncomment once the logger is added
// $this->_fbeHelper->logException($e);
throw new Exception(
'Oops, there was error while processing your request.' .
' Please contact admin for more details.'
);
}
}
}