mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
dd1025119d
commit
03b4de3253
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
use Icinga\Application\Icinga;
|
use Icinga\Application\Icinga;
|
||||||
use Icinga\Application\Logger;
|
use Icinga\Application\Logger;
|
||||||
|
use Icinga\Exception\HttpNotFoundException;
|
||||||
use Icinga\Exception\MissingParameterException;
|
use Icinga\Exception\MissingParameterException;
|
||||||
use Icinga\Security\SecurityException;
|
use Icinga\Security\SecurityException;
|
||||||
use Icinga\Web\Controller\ActionController;
|
use Icinga\Web\Controller\ActionController;
|
||||||
@ -45,8 +46,8 @@ class ErrorController extends ActionController
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $exception instanceof SecurityException:
|
case $exception instanceof HttpNotFoundException:
|
||||||
$this->getResponse()->setHttpResponseCode(403);
|
$this->getResponse()->setHttpResponseCode(404);
|
||||||
break;
|
break;
|
||||||
case $exception instanceof MissingParameterException:
|
case $exception instanceof MissingParameterException:
|
||||||
$this->getResponse()->setHttpResponseCode(400);
|
$this->getResponse()->setHttpResponseCode(400);
|
||||||
@ -55,6 +56,9 @@ class ErrorController extends ActionController
|
|||||||
'Missing parameter ' . $exception->getParameter()
|
'Missing parameter ' . $exception->getParameter()
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case $exception instanceof SecurityException:
|
||||||
|
$this->getResponse()->setHttpResponseCode(403);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$this->getResponse()->setHttpResponseCode(500);
|
$this->getResponse()->setHttpResponseCode(500);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user