From e8c704b98d46abb1304e098b744f61f8d2829c2b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 20 May 2015 10:36:05 +0200 Subject: [PATCH] monitoring: Fix HTTP response code when showing an invalid service refs #6281 --- .../application/controllers/ServiceController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/monitoring/application/controllers/ServiceController.php b/modules/monitoring/application/controllers/ServiceController.php index d6105df4d..2886650c9 100644 --- a/modules/monitoring/application/controllers/ServiceController.php +++ b/modules/monitoring/application/controllers/ServiceController.php @@ -21,17 +21,17 @@ class Monitoring_ServiceController extends MonitoredObjectController /** * Fetch the requested service from the monitoring backend - * - * @throws Zend_Controller_Action_Exception If the service was not found */ public function init() { - $service = new Service($this->backend, $this->params->get('host'), $this->params->get('service')); + $service = new Service( + $this->backend, $this->params->getRequired('host'), $this->params->getRequired('service') + ); $this->applyRestriction('monitoring/services/filter', $service); if ($service->fetch() === false) { - throw new Zend_Controller_Action_Exception($this->translate('Service not found')); + $this->httpNotFound($this->translate('Service not found')); } $this->object = $service; $this->createTabs();