mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
parent
f467d085b0
commit
26d1a04e48
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Controllers;
|
namespace Icinga\Controllers;
|
||||||
|
|
||||||
|
use Icinga\Web\Response\JsonResponse;
|
||||||
use Zend_Controller_Plugin_ErrorHandler;
|
use Zend_Controller_Plugin_ErrorHandler;
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
@ -86,11 +87,9 @@ class ErrorController extends ActionController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->getRequest()->isApiRequest()) {
|
if ($this->getRequest()->isApiRequest()) {
|
||||||
// @TODO(el): Use ApiResponse class for unified response handling.
|
$this->getResponse()->json()
|
||||||
$this->getResponse()->sendJson(array(
|
->setErrorMessage($this->view->message)
|
||||||
'status' => 'error',
|
->sendResponse();
|
||||||
'message' => $this->view->message
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->request = $error->request;
|
$this->view->request = $error->request;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user