/** * Overloaded execute function to handle exceptions in JSON requests */ public function execute($action, KControllerContextInterface $context) { try { return parent::execute($action, $context); } catch (Exception $e) { return $this->_handleException($e); } }