From 30add41572cb6a025290cdd8eee26fd371d8ac37 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 24 Aug 2015 15:59:25 +0200 Subject: [PATCH] Handle the HttpBadRequestException in the error controller refs #9606 --- application/controllers/ErrorController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/controllers/ErrorController.php b/application/controllers/ErrorController.php index 1f689fd34..ecd1ed0da 100644 --- a/application/controllers/ErrorController.php +++ b/application/controllers/ErrorController.php @@ -3,6 +3,7 @@ use Icinga\Application\Icinga; use Icinga\Application\Logger; +use Icinga\Exception\Http\HttpBadRequestException; use Icinga\Exception\Http\HttpMethodNotAllowedException; use Icinga\Exception\Http\HttpNotFoundException; use Icinga\Exception\MissingParameterException; @@ -64,6 +65,9 @@ class ErrorController extends ActionController 'Missing parameter ' . $exception->getParameter() ); break; + case $exception instanceof HttpBadRequestException: + $this->getResponse()->setHttpResponseCode(400); + break; case $exception instanceof SecurityException: $this->getResponse()->setHttpResponseCode(403); break;